Transactions over JNDI

I have to WebLogic 5.1 sp4 servers running non-clustered. From a session
bean method which is transaction Required I do a bind or lookup from one
machine to the other. This works fine, but 30 seconds later, I get a
message
from the second server (not running the bean) saying that the transaction
timed out
Fri Jul 21 14:10:43 EDT 2000:<I> <TX> Transaction (TxC (508234144, xid =
964202469692_3, timeout = 30, txState = Marked Rollback, root =
5579374773776952185S120.16.2.69:[9011,9011,9012,9012,9011,-1]/271) rolled
back after 30 sec..
Has anyone seen this? Is there a way around this? The problem exists
whether I
close the connection or not.
Thanks-
-Doug

Marcus Wittig <[email protected]> writes:
I read in the e-docs that WLE does not support transactions over IIOP,
because "the requirement for transaction propagation from the client
is in question".
There is the OTS (currently, we are talking about version 1.2) out for
quite a while. Why exactly are transactions not supported? Will there
be an OTS conformant implementation in WLE in the near future?You are referencing the WLS docs but refer to WLE, which is it you
want?
OTS will be supported in WLS 7.0. However, the JDK client does not
support OTS, so client-demarcated transactions (as opposed to
server-server) will still be problematic. We will almost certainly
provide the explict OTS bindings for clients so that it can be used
from C++ clients, however this is somewhat cumbersome for J2EE
clients.
andy

Similar Messages

  • Transaction over IIOP ?

    Hi,
              I read in the e-docs that WLE does not support transactions over IIOP, because
              "the requirement for transaction propagation from the client is in question".
              There is the OTS (currently, we are talking about version 1.2) out for quite a
              while. Why exactly are transactions not supported? Will there be an OTS
              conformant implementation in WLE in the near future?
              My source is http://e-docs.bea.com/wls/docs61/rmi_iiop/API_rmi_iiop.html#1050737
              "While RMI over IIOP does allow CORBA/IDL clients to access EJBeans, the
              following services will not be available:
              * EJB transaction services
              * EJB security services"
              Cheers,
              Jörg
              

    I think this may be coming in the next release or perhaps even a service pack.
              Post to the "rmi-iiop" group for exact info.
              Joerg Bartholdt wrote:
              > Hi,
              >
              > I read in the e-docs that WLE does not support transactions over IIOP, because
              > "the requirement for transaction propagation from the client is in question".
              >
              > There is the OTS (currently, we are talking about version 1.2) out for quite a
              > while. Why exactly are transactions not supported? Will there be an OTS
              > conformant implementation in WLE in the near future?
              >
              > My source is http://e-docs.bea.com/wls/docs61/rmi_iiop/API_rmi_iiop.html#1050737
              > "While RMI over IIOP does allow CORBA/IDL clients to access EJBeans, the
              > following services will not be available:
              > * EJB transaction services
              > * EJB security services"
              >
              > Cheers,
              > Jörg
              

  • Transactions over IIOP?

    Hi,
    I read in the e-docs that WLE does not support transactions over IIOP,
    because "the requirement for transaction propagation from the client is
    in question".
    There is the OTS (currently, we are talking about version 1.2) out for
    quite a while. Why exactly are transactions not supported? Will there be
    an OTS conformant implementation in WLE in the near future?
    My source is
    http://e-docs.bea.com/wls/docs61/rmi_iiop/API_rmi_iiop.html#1050737
    It says: "While RMI over IIOP does allow CORBA/IDL clients to access
    EJBeans, the following services will not be available:
    * EJB transaction services
    * EJB security services"
    Cheers,
    Marcus

    Marcus Wittig <[email protected]> writes:
    I read in the e-docs that WLE does not support transactions over IIOP,
    because "the requirement for transaction propagation from the client
    is in question".
    There is the OTS (currently, we are talking about version 1.2) out for
    quite a while. Why exactly are transactions not supported? Will there
    be an OTS conformant implementation in WLE in the near future?You are referencing the WLS docs but refer to WLE, which is it you
    want?
    OTS will be supported in WLS 7.0. However, the JDK client does not
    support OTS, so client-demarcated transactions (as opposed to
    server-server) will still be problematic. We will almost certainly
    provide the explict OTS bindings for clients so that it can be used
    from C++ clients, however this is somewhat cumbersome for J2EE
    clients.
    andy

  • How to display a particular transaction over portal as per its id

    hi
    we have a requirement like this...
    we have already developed some 200 iviews and the corrosponding pages...
    now we want to develope an application either in web dynpro or pdk that we will upload over portal. that application will be having an inputfield for entering transaction number and a search button.
    on the click of button our application must be able to search and display the corrosponding transactional iview already developed
    plz guide on how this is possible

    Hi,
    I don't think message input text allows to set URI property and it is available with MessageStyledText.
    So if you want to achieve your requirement then you can take two items one message text input and other one as messageStylesText then if it is readonlymode then hide input text and render MessageStyled text and viceversa.
    In this case you will be able to display links in case of Readonly text.
    Regards,
    Reetesh Sharma

  • Ejb transaction management jndi lookup name problem

    Hi everyone
    i want to use usertransaction object.
    &#304; called it with jndi name like UserTransaction tran = (UserTransaction) ctx.lookup("java:comp/UserTransaction");
    But there are many exception occur.
    Exception in thread "main" java.lang.NoClassDefFoundError: org/netbeans/modules/schema2beans/BaseBean
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
         at com.sun.enterprise.admin.event.AdminEventListenerRegistry.addEventListener(AdminEventListenerRegistry.java:262)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.<clinit>(J2EETransactionManagerImpl.java:1404)
         at com.sun.enterprise.distributedtx.UserTransactionImpl.init(UserTransactionImpl.java:119)
         at com.sun.enterprise.distributedtx.UserTransactionImpl.<init>(UserTransactionImpl.java:101)
         at com.sun.enterprise.distributedtx.UserTransactionImpl.<init>(UserTransactionImpl.java:92)
         at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:194)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:407)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at org.columbus.teien.entities.Deneme.main(Deneme.java:42)
    Caused by: java.lang.ClassNotFoundException: org.netbeans.modules.schema2beans.BaseBean
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    My session beans are stateless and i use container-managed transaction management(cmt)
    And my application server is glassfish 2.1
    How can i use this problem.
    Thanks for your reply.

    Do you have org.netbeans.modules.* classes referenced in your code?
    Those IDE classes are (correctly) not available on your container so you should consider not using them in your code.

  • Query about transactions over the whole chart of accounts

    hi, i'm a beginner with the SAP SDK, so pleaase be patient , i 'm working to do a SQL-query (yeah, i'm not allowed to use  the COM objects) for all the transactions made on every account and also to retrieve their profit centers, so i have a few questions/validations that i need about the SAP bd-model:
    as far as i know, the tables involved with this query i need are:
    OJDT - journal entry
    JDT1 - journal entry rows
    OOCR - Distribution rules
    OACT - Accounts
    OPRC - Profit Centers
    ..¿or can i just skip the OOCR table and join the tables JDT1 and OPRC using the PrCode field? (the reference says this field is a FK of the OOCR table so that's why i'm not sure about this, even if the field name is fool-proof )
    thanxs for your time!!
    EDIT: this is the query so far,  i have  my doubts about the use of PrcCode(JDT1) as a FK for the OPRC table (because like i was mentioning before, the documentation says it isn't, it's a FK for the OORC table)
    also the DI API Help file says there is also another 4 FK fields (ocrcode2,ocrcode3,ocrcode4,ocrcode5) for the OOCR table, so i'm wondering if this SQL query is fine like this or if i'm missing something else please help mee!
    SELECT
    je1.TransId
    ,je1.Debit
    ,je1.Credit
    ,acc.AcctCode
    ,acc.AcctName
    ,prc.PrcName
    ,prc2.PrcName
    ,prc3.PrcName
    ,prc4.PrcName
    ,prc5.PrcName
    ,je.Memo
    FROM
    JDT1 as je1
    left join OPRC as prc on je1.ProfitCode = prc.PrcCode
    left join OPRC as prc2 on je1.OcrCode2 = prc2.PrcCode
    left join OPRC as prc3 on je1.OcrCode3 = prc3.PrcCode
    left join OPRC as prc4 on je1.OcrCode4 = prc4.PrcCode
    left join OPRC as prc5 on je1.OcrCode5 = prc5.PrcCode
    inner join OACT as acc on je1.Account = acc.AcctCode
    inner join OJDT as je on je1.TransId = je.TransId
    and je.RefDate <= '20101028 00:00'
    GROUP BY
    je1.TransId
    ,je1.Credit
    ,je1.Debit
    ,acc.AcctCode
    ,acc.AcctName
    ,prc.PrcName
    ,prc2.PrcName
    ,prc3.PrcName
    ,prc4.PrcName
    ,prc5.PrcName
    ,je.Memo

    When u have created your company that time u should create with copy anuway
    but it's look to me your COA is not generated with depending accounts

  • Distributed transaction over rpc

    Hi,
    I'm developing a distributed system configured as:
    - an xml-rpc server that provide/store data into a database
    - multiple Swing based client that display/modify the stored data invoking a server remote procedure
    so clients don't access the database but simply extract datas from user inputs and send them as parameters of a remote call.
    The server (remote) method invoked by clients is declared as syncronized and
    I use a single JDBC connection to the database.
    I need to give the client the possibility to ask the server to begin a database transaction, to make some (write) request, and finally to commit or rollback depending on requests's success.
    Do I have to use JTA API?
    Do I have to introduce connection pooling?
    And what do you think about this implementation? any suggestion?
    Thank's for the attention, sorry for my english

    I will try to make a quick typical example: authors
    and books.
    Please, for the last time, tell me if I have to worry
    about my health...
    My swing interface show a tabbed pane to the client
    who want to store a new author:
    in the first tab client fill generic information
    about the author (name,birth,...)
    in the second tab client add a list of books
    When client want to save this data I want to call two
    distinct remote methods,doing two different
    requests:
    1.saveAuthor(<listOfParams>)
    2.savePubblications(<listOfParams>)
    'd like to keep this methods separate because if I
    want to modify only author data or only pubblications
    data (relative to a just saved author) I want to use
    the same panels, collect data from panels in the same
    way, and call the same remote method, calling
    saveAuthor() in the first case and
    savePubblications() in the second.Yes. In those cases saving author alone or publications alone are units of work.
    I'd like to emphasize that the code to save either author or publications is NOT in the Swing UI. They should be separate Java classes that you can write, test, and debug separately, without any UI.
    Do a search for the Data Access Object or DAO pattern. That's what you need here.
    But when I create a new author I want save his data
    and his pubblications all together. For this reason
    I'd like to specify from client when a group of
    requests are to be threatened as one.yes, but in that case you have to provide some kind of button to trigger an event that indicates that both author and publications are to be a combined unit of work. The thing that will demark the transaction is a service object, that in turn will use both the author and publication DAOs in a single transaction.
    each request could be something like this:
    connection.setAutocommit(false);
    2..n write operations
    connection.setAutocommit(true);
    so I thoughtI can't use connection level transaction
    management but something like JTA.No, you can use either JTA or Java hand-coded transactions. You just have to be able to pass the same connection to both DAOs.
    Or implement my "request transaction" system if JTA
    is not for this purpose.You need separate DAOs that know nothing about transactions.
    You need a service layer that does know about transactions and uses DAOs to satisfy user requests.
    %

  • Transactions over multiple application servers

    Hello,
    we have following situation.
    We have a bunch of core services deployed on a central application server and some applications deployed on individual application servers.
    The services are developed as normal remote interfaces.
    The core service interfaces have special annotations, so the service locator knows, that he has to lookup them on other servers.
    Now we have the following case:
    This code is executed in application server 1.
    Service2 is deployed in application server 2 and Service3 in application server 3.
    public void doSomething() {
            ServiceLocator locator = ServiceLocator.getInstance();
            Service2 service2 = locator.getService(Service2.class);
            service2.doSomething();
            Service3 service3 = locator.getService(Service3.class);
            service3.doSomething();
    }Each of the calls to service2 and service3 performs some database operations.
    But, if service3.doSomething() fails, the database operations done by service2.doSomething() are not rolled back. (no surprise)
    What do we have to do, so that the service2 operations are also rolled back on service3 failures?
    Thanks
    Dirk

    Doesn't work... :(
    Here my sample code:
    Service1 (deployed on AS1)
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
        public void doSomething() {
            Logger.getLogger(getClass().getName()).info("doSomething");
            ServiceLocator locator = ServiceLocator.getInstance();
            Service1Entity entity = new Service1Entity();
            entityManager.persist(entity);
            Service2 service2 = locator.getService(Service2.class);
            service2.doSomething();
            Service3 service3 = locator.getService(Service3.class);
            service3.doSomething();
        }Service2 (deployed on AS2)
    @TransactionAttribute(TransactionAttributeType.MANDATORY)
        public void doSomething() {
            Logger.getLogger(getClass().getName()).info("doSomething");
            Service2Entity entity = new Service2Entity();
            entityManager.persist(entity);
        }Service3 (deployed on AS3)
    @TransactionAttribute(TransactionAttributeType.MANDATORY)
        public void doSomething() {
            Logger.getLogger(getClass().getName()).info("doSomething");
            Service3Entity entity = new Service3Entity();
            entity.setUuid("Bang");
            entityManager.persist(entity);
        }Each service has a XA datasource configured. The all access the same database.
    But when I call service1.doSomething(), I get a javax.ejb.EJBTransactionRequiredException from service 2.
    Does somebody has an idea?
    thanks
    Dirk

  • Problem completing transaction over items i want to purchase for games.

    I can't purchased items from in game. It prompts me to check with I-tunes support to complete the transaction

    Do you have Restrictions turned On for In App Purchases...
    iPhone User Guide
    http://manuals.info.apple.com/en_US/iphone_user_guide.pdf

  • No JNDI-Name found after implementing OpenEJB

    Hello. My problem is as follows. I built up a ConnectionPool with OracleDataSource over JNDI, which was found and worked fine. Since I installed OpenEJB and created a stateful session bean, the datasource is not found anymore. I'am using Tomcat 5.5, OpenEJB 1.0.
    out of my /WEB-INF/web.xml
    <resource-ref>
          <description>DB Connection</description>
          <res-ref-name>jdbc/ito</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
      </resource-ref>
    <ejb-ref>
        <description>
            EJB Reference to the bean deployed to OpenEJB
        </description>
        <ejb-ref-name>dbconnection</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <home>de.dpits.bln.poe.ito.persistency.DBConnectionInterface</home>
        <remote>de.dpits.bln.poe.ito.persistency.DBConnectionRemote</remote>
    </ejb-ref>
      <servlet>
        <servlet-name>loader</servlet-name>
        <servlet-class>org.openejb.loader.LoaderServlet</servlet-class>
        <init-param>
          <param-name>openejb.loader</param-name>
          <param-value>tomcat-webapp</param-value>
        </init-param>
        <init-param>
          <param-name>openejb.home</param-name>
          <param-value>C:/Programme/openejb1.0</param-value>
        </init-param>
        <load-on-startup>0</load-on-startup>
      </servlet>out of the context-tag from my server.xml
    <Resource
          factory="oracle.jdbc.pool.OracleDataSourceFactory"
          driverClassName="oracle.jdbc.OracleDriver"
          class="oracle.jdbc.pool.OracleDataSource"
          type="oracle.jdbc.pool.OracleDataSource"
          name="jdbc/ito"
          auth="Container"
          removeAbandoned="true"
          removeAbandonedTimeout="3"
          maxWait="5000"
          url="jdbc:oracle:thin:@localhost:1521:ITO"
          maxActive="50"
          maxIdle="0"/>
        <Ejb name="dbconnection"
        type="Session"
        home="de.dpits.bln.poe.ito.persistency.DBConnectionInterface"
        remote="de.dpits.bln.poe.ito.persistency.DBConnectionRemote"/>
        <ResourceParams name="dbconnection">
        <parameter>
            <name>factory</name>
            <value>org.openejb.client.TomcatEjbFactory</value>
        </parameter>
        <parameter>
            <name>openejb.naming.factory.initial</name>
            <value>org.openejb.client.LocalInitialContextFactory</value>
        </parameter>
        <parameter>
            <name>openejb.naming.provider.url</name>
            <value>localhost:4201</value>
        </parameter>
        <parameter>
            <name>openejb.ejb-link</name>
            <value>dbconnection</value>
        </parameter>
        </ResourceParams>out of my jsp
    Context initContext = new InitialContext();
    OracleDataSource ds = (OracleDataSource)initContext.lookup("Name "java:comp/env/jdbc/ito" not found. ");throws -> Name ito is not bound in this Context
    as I already said, this worked before adding all the configuration for the session-bean.

    OracleDataSource ds =
    (OracleDataSource)initContext.lookup("Name
    "java:comp/env/jdbc/ito" not found. ");Did you actually write the lookup string like this? :o

  • Database transaction management in Web services

    Hi,
    I am using Oracle8i and firing some database queries from my web services. I want to do the transaction management for the same i.e. When one of the queries fail, i want to rollback. But when i write my own transaction management, it gives me an error :
    java.sql.SQLException: Cannot call Connection.commit in distributed transaction.Transaction Manager will commit the resource manager when the distributed transaction is committed.
    Can anyone please help me out as to how to perform the database transaction management in web services.
    Thanking in advance.
    Prashant

    Unfortunately to manage transactions over web services there is no viable solution available in market. All implementations come with restrictions e.g. Metro works with only EJBs on Glassfish, JBossTS works on JBoss but not with JAX-WS, Atomikos supports only Axis as of now.
    1. See explanation above.
    2. Yes, it can be but conditions mentioned above are applied :-)
    3. [www.oasis-open.org/committees/ws-tx/|www.oasis-open.org/committees/ws-tx/]
    4. Unfortunately as of now I do not see an easy way to this problem.

  • JNDI and env. vars. in ejb-jar.xml

    I have been trying for several days now to have my EJB session bean access
    its env. vars. stored in the ejb-jar.xml document. I have been unsuccessful.
    The only place I have been able to store my env. vars. is in the web.xml
    document outside my .jar file. Although workable, it would be preferable to
    store them in the ejb-jar.xml document in my .jar file.
    I am hoping some one can help me. I am using the following code in my ejb:
    Context init = new InitialContext();
    Context env = (Context)init.lookup("java:comp/env");
    m_bTruncCorporate =
    ((Boolean)env.lookup(MICRworks.MICR_ENV_TRUNCORP)).booleanValue();
    m_strOptPath = (String)env.lookup(MICRworks.MICR_ENV_OPFLPATH);
    m_strOptAccount = (String)env.lookup(MICRworks.MICR_ENV_OPFLACCT);
    m_strOptRouting = (String)env.lookup(MICRworks.MICR_ENV_OPFLROUT);
    My ejb-jar.xml follows:
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
    JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>MICRworksBean</ejb-name>
    <home>USDataworks.MICRworks.MICRworksHome</home>
    <remote>USDataworks.MICRworks.MICRworks</remote>
    <ejb-class>USDataworks.MICRworks.MICRworksBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <env-entry>
    <description>Flag indicating whether to convert corporate
    checks</description>
    <env-entry-name>TruncateCorporate</env-entry-name>
    <env-entry-type>java.lang.Boolean</env-entry-type>
    <env-entry-value>true</env-entry-value>
    </env-entry>
    <env-entry>
    <description>Location of the 1For1 exclusion files</description>
    <env-entry-name>OptionFilePath</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>http://localhost:7001/MICRworksLite/files/</env-entry-value
    >
    </env-entry>
    <env-entry>
    <description>Name of the 1For1 account exclusions file</description>
    <env-entry-name>OptionFileAccount</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>account_file.txt</env-entry-value>
    </env-entry>
    <env-entry>
    <description>Name of the 1For1 routing exclusion file</description>
    <env-entry-name>OptionFileRouting</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>routing_file.txt</env-entry-value>
    </env-entry>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>MICRworksBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Supports</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    and my weblogic-ejb-jar.xml:
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 7.0.0
    EJB//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>MICRworksBean</ejb-name>
    <stateless-session-descriptor>
    <pool>
    </pool>
    <stateless-clustering>
    </stateless-clustering>
    </stateless-session-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <jndi-name>MICRworksBean</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    My feeling is that I am missing some sort of reference in the
    weblogic-ejb-jar.xml that points to the ejb-jar.xml but I have tried several
    things without success.
    I would appreciate any help I can get...especially if it contains specific
    code I can use as I am rather new to writing and deploying ejbs!
    Thanx in advance. Marek :-)

    Thanks for the reference. I was using another book as a reference (Using
    Java 2 Enterprise Edition by Mark Wutka) which had the same sort of example
    and as you can see below, I coded my bean as they suggest...I'm still unable
    to access the env. vars.!
    I deployed by bean using WebLogic's Builder and but didn't create any sort
    of application. I let WebLogic do what it would on its own. The WebLogic
    documentation seemed to indicate for simple testing this would work
    fine...is it wrong?
    btw. MICRworks.MICR_ENV_TRUNCORP equates to "TruncateCorporate" as you
    probably guessed.
    The WebLogic Admin Console shows the environment variables in the EJB
    Descriptors for my EJB but they do not show up when I view the JNDI tree for
    my server. I have taken this to mean that the deployment tool is not
    binding my env. vars. for some reason which would explain why my bean can't
    find them.
    I know it must be something stupid I am doing (or not doing) but I just
    can't see it. Please help!
    "Ryan LeCompte" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hello Marek,
    I would suggest that you download the free book "Mastering EJB 2ndEdition" by
    Ed Roman, Scott Ambler, and Tyler Jewell. The source code for the book isalso
    freely available and is meant to be deployed specifically on WebLogic.Look for
    a sample application called "Jasmine", which shows how to use environmententries.
    You will see a concrete example of how they are defined and later accessedfrom
    within EJBs. The book and source code are available at the followingaddress:
    >
    http://www.theserverside.com/books/masteringEJB/index.jsp
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Marek Kossak" <[email protected]> wrote:
    I have been trying for several days now to have my EJB session bean
    access
    its env. vars. stored in the ejb-jar.xml document. I have beenunsuccessful.
    The only place I have been able to store my env. vars. is in the web.xml
    document outside my .jar file. Although workable, it would be preferable
    to
    store them in the ejb-jar.xml document in my .jar file.
    I am hoping some one can help me. I am using the following code in my
    ejb:
    Context init = new InitialContext();
    Context env = (Context)init.lookup("java:comp/env");
    m_bTruncCorporate =
    ((Boolean)env.lookup(MICRworks.MICR_ENV_TRUNCORP)).booleanValue();
    m_strOptPath = (String)env.lookup(MICRworks.MICR_ENV_OPFLPATH);
    m_strOptAccount = (String)env.lookup(MICRworks.MICR_ENV_OPFLACCT);
    m_strOptRouting = (String)env.lookup(MICRworks.MICR_ENV_OPFLROUT);
    My ejb-jar.xml follows:
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
    JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>MICRworksBean</ejb-name>
    <home>USDataworks.MICRworks.MICRworksHome</home>
    <remote>USDataworks.MICRworks.MICRworks</remote>
    <ejb-class>USDataworks.MICRworks.MICRworksBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <env-entry>
    <description>Flag indicating whether to convert corporate
    checks</description>
    <env-entry-name>TruncateCorporate</env-entry-name>
    <env-entry-type>java.lang.Boolean</env-entry-type>
    <env-entry-value>true</env-entry-value>
    </env-entry>
    <env-entry>
    <description>Location of the 1For1 exclusion files</description>
    <env-entry-name>OptionFilePath</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>http://localhost:7001/MICRworksLite/files/</env-entry-valu
    e
    >>>
    </env-entry>
    <env-entry>
    <description>Name of the 1For1 account exclusions file</description>
    <env-entry-name>OptionFileAccount</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>account_file.txt</env-entry-value>
    </env-entry>
    <env-entry>
    <description>Name of the 1For1 routing exclusion file</description>
    <env-entry-name>OptionFileRouting</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>routing_file.txt</env-entry-value>
    </env-entry>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>MICRworksBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Supports</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    and my weblogic-ejb-jar.xml:
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic
    7.0.0
    EJB//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>MICRworksBean</ejb-name>
    <stateless-session-descriptor>
    <pool>
    </pool>
    <stateless-clustering>
    </stateless-clustering>
    </stateless-session-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <jndi-name>MICRworksBean</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    My feeling is that I am missing some sort of reference in the
    weblogic-ejb-jar.xml that points to the ejb-jar.xml but I have tried
    several
    things without success.
    I would appreciate any help I can get...especially if it containsspecific
    code I can use as I am rather new to writing and deploying ejbs!
    Thanx in advance. Marek :-)

  • Why my credit card is debitted when i didn't made any transaction with itunes.

    why my credit card is debitted when i didn't made any transaction with itunes..
    These days having a lot of problems with itunes (apple) they are making automatic transactions over my credit card .
    They did 5 transactions in a day and 1 transaction is about 26 USD .. .
    Why these kind of burglary happening with my account ...

    You've checked the purchase history on your account (Store > View My Account, Store > View My Apple ID on iTunes 11, menu option on your computer's iTunes), and have you made any in-app purchases or have any auto-renewing subscriptions ?  If not then you can contact iTunes support via this page (these are user-to-user forums) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Transaction management in EJB

    Suppose, a method in session bean is called that deals with some entity beans. I want to maintain transaction over some block of codes separately (e.g. History table has to be updated synchronously with the master table) not over the whole things in the method. How it can be done?

    Hi Kuntal,
    BMP/CMP and BMT/CMT are completely different. BMP/CMP (Bean-managed persistence/ Container-managed persistence) describes the way in which entity bean persistence is handled.
    BMT/CMT (Bean-managed transactions / Container-managed transactions) controls whether bean developer or the container is in charge of demarcating transactions.
    Entity beans can be either BMP or CMP. However, they always have CMT. It's not possible to use UserTransaction wtihin an entity bean.
    For session beans, you can use BMT and use the session bean as a facade to access your entity beans. That would give you the control you're looking for.

  • Weblogic.management.security with transactions, Please HELP

    I am using weblogic.management.security.authentication API to programmatically insert/delete users and passwords into/from default security provider on Weblogic Server 8.1. I want to add transactional support to this these actions, I tried using UserTransaction API but without any luck. Does weblogi.managment.security.authenication has no transactional support (rollback-commit) or am I doing something wrong? I very much appreciate your help and looking forward to hearing from you!!!!
    It doesn't rollback, Here is the code:
    UserTransaction transaction = (UserTransaction)ctx.lookup("javax.transaction.UserTransaction");
    transaction.begin();
    UserEditorMBean userEditor = (UserEditorMBean)providers;
    userEditor.createUser(userName, password, description);
    transaction.rollback();

    I do not think you can have transactions over MBean calls as they communicate with relevant object over t3 and this objects are possibly in different class loader.
    -TJ

Maybe you are looking for

  • Can I update keynotes version 5.1.1. to keynotes version 6.2.2. on my macbook pro using snow lepeard?

    I have a Macbook pro still on Snow Leopard with Keynotes version 5.1.1.(09) I have created a Keynote presentation on my MacPro using keynotes v 6.2.2. When I tried to send the 6.2.2. version over to my Macbook it stated that it was not a valid keynot

  • PSE 10 organizer crash

    Recently I transferred my 18.000+ PSE 10 catalog to another hard drive. Everything went well but .... After importing the first batch of new photo's the organizer suddenly crashed. This never happened before. For the last 10 days I have been searchin

  • 6288 - screen goes dark after 15 seconds

    Hi Have just purchased a 6288. Screen goes dark after 10 - 15 seconds if you don't touch the keypad - very annoying if reading a message. Have turned Power saver and sleep mode off, but screen still goes dark. Does anyone know how to stop it from doi

  • Cover flow not updating in mavericks

    Hi, I've been finding that the finder is a touch buggy in Mavericks, i'm using a brand new iMac with a clean install, and i'm getting all sorts of issues. Coverflow in particular is mis-behaving, If i delete a file, it's still visible in Coverflow. A

  • Cant open iTunes error 7 (windows error 998)

    Its been a while my iTunes is not working. Every time i try to it keeps poping up the error message error 7 (windows error 998). What should i do?