Propagating User Transactions

Hi,
I am trying to check how user transactions work in context of the OC4j Containers.
I have deployed a Stateless Session Bean in the 'standalone' OC4J container of JDev10.1.3. I then exposed the EJB as a WebService.
Next, I wrote a client and am running it in the 'embedded' OC4J container of JDev 10.1.3. From this client, I am trying to invoke the bean methods as WebService calls. Below is my client code:
<code>
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.PROVIDER_URL, "ormi://localhost:23791/");
env.put(Context.SECURITY_PRINCIPAL, "oc4jadmin");
env.put(Context.SECURITY_CREDENTIALS, "welcome");
Context context = new InitialContext(env);
ut = (UserTransaction) context.lookup("java:comp/UserTransaction");
ut.begin();
// call bean methods.
ut.commit();
</code>
However, I am not able to look up the JNDI Name for UserTransaction in the embedded OC4J. I tried both "java:comp/UserTransaction" and "jta/usertransaction".
Could somebody please let me know how to lookup the User Transaction from the Context in OC4J?
Also, I read somewhere that UserTransactions (begin .. method .. commit/rollback) is not supported in OC4J unless the EJB are running in the same container? Is this true? In which case, my above test scenario would never work, is it?
Many thanks in Advance.
Regards,
Pratul

Hi Katalin!
Thanks a lot for your reply.
You are right. The port 23891 is the correct port for ORMI for embedded OC4J.
Actually, I was trying to execute the client as a standalone Java class (public static void main() ). I eventually moved my client code to a JSP and was able to retrieve the UserTransaction object using "java:comp/UserTransaction".
I found this strange since I have tested transaction boundaries in a similar fashion using WSAD and it worked just fine. The only reason I could think of was that the classloader in JDeveloper was not able to load the complete environment implementations of the transactions, before the lookup call is made from my code.
However, now after having moved my client code into a JSP, the UserTransaction object retrieved is "com.sun.enterprise.distributedtx.UserTransactionImpl".
And when I invoke the begin() method on this transaction object, I get a NullPointerException. :((
06/10/03 15:31:07 java.lang.NullPointerException
06/10/03 15:31:07      at com.sun.jts.jta.TransactionManagerImpl.begin(TransactionManagerImpl.java:171)
06/10/03 15:31:07      at com.sun.jts.jta.UserTransactionImpl.begin(UserTransactionImpl.java:50)
06/10/03 15:31:07      at com.sun.enterprise.distributedtx.UserTransactionImpl.begin(UserTransactionImpl.java:66)
Does anybody have any idea why that particular reference of the UserTransaction object is returned? Is it because of any extra/missing jar files in the classpath? Why a NullPointerException , even when the object itself is not null ?
Please help !!
Thanks,
Pratul

Similar Messages

  • Error occurred during the rollback using User Transaction

    Dear all,
    I am trying to insert a record in SQL Server, using a session bean. In session bean , I started the user transaction, then get the JDBC connection (Using JDBCTxDataSource) and query is executed for inserting a record. If any SQL exception occurred during the insertion, I catch the exception, then I closed the connection and I rollback the transaction . If exception occurs, inserted data is rolled back and same the time it is giving a weblogic error. Please help me in solving this error.
    Error is,
    java.sql.SQLException: The transaction is no longer active - status: 'Rolling Back. [Reason=Unknown]'. No further JDBC access is allowed within this transaction.
    at weblogic.jdbc.wrapper.JTSConnection.checkIfRolledBack(JTSConnection.java:155)
    at weblogic.jdbc.wrapper.JTSConnection.checkConnection(JTSConnection.java:164)
    at weblogic.jdbc.wrapper.Statement.checkStatement(Statement.java:234)
    at weblogic.jdbc.wrapper.Statement.cancel(Statement.java:368)
    at weblogic.jdbc.wrapper.Connection.cancelAllStatements(Connection.java:292)
    at weblogic.jdbc.wrapper.JTSConnection.internalRollback(JTSConnection.java:388)
    at weblogic.jdbc.wrapper.JTSXAResourceImpl.rollback(JTSXAResourceImpl.java:75)
    at weblogic.transaction.internal.XAServerResourceInfo.rollback(XAServerResourceInfo.java:1317)
    at weblogic.transaction.internal.XAServerResourceInfo.rollback(XAServerResourceInfo.java:650)
    at weblogic.transaction.internal.ServerSCInfo.startRollback(ServerSCInfo.java:729)
    at weblogic.transaction.internal.ServerTransactionImpl.localRollback(ServerTransactionImpl.java:1829)
    at weblogic.transaction.internal.ServerTransactionImpl.globalRollback(ServerTransactionImpl.java:2511)
    at weblogic.transaction.internal.ServerTransactionImpl.internalRollback(ServerTransactionImpl.java:383)
    at weblogic.transaction.internal.ServerTransactionImpl.rollback(ServerTransactionImpl.java:362)
    at weblogic.transaction.internal.TransactionManagerImpl.rollback(TransactionManagerImpl.java:320)
    at com.bis.dbservices.entitydao.BISEntityBean.createEntity(BISEntityBean.java:308)
    at com.bis.dbservices.entitydao.BISEntityBean_wo2ue8_EOImpl.createEntity(BISEntityBean_wo2ue8_EOImpl.java:592)
    Thanks
    Maria Singh

    Hi. That is a bug. I have the fix for it.
    Contact support and ask for a fix for CR211812.
    Joe
    Raja M wrote:
    Joe,
    In CR196085, it is mentioned that transaction problem is solved in Weblogic 8.1, SP4
    So, I installed weblogic 8.1 SP4. But now, I am getting different error. Please help me.
    The stactrace is as follows,
    java.lang.NullPointerException
    at weblogic.jdbc.wrapper.Statement.cancel(Statement.java:426)
    at weblogic.jdbc.wrapper.Connection.cancelAllStatements(Connection.java:301)
    at weblogic.jdbc.wrapper.JTSConnection.internalRollback(JTSConnection.java:453)
    at weblogic.jdbc.wrapper.JTSXAResourceImpl.rollback(JTSXAResourceImpl.java:75)
    at weblogic.transaction.internal.XAServerResourceInfo.rollback(XAServerResourceInfo.java:135
    8)
    at weblogic.transaction.internal.XAServerResourceInfo.rollback(XAServerResourceInfo.java:687
    at weblogic.transaction.internal.ServerSCInfo.startRollback(ServerSCInfo.java:729)
    at weblogic.transaction.internal.ServerTransactionImpl.localRollback(ServerTransactionImpl.j
    ava:1909)
    at weblogic.transaction.internal.ServerTransactionImpl.globalRollback(ServerTransactionImpl.
    java:2592)
    at weblogic.transaction.internal.ServerTransactionImpl.internalRollback(ServerTransactionImp
    l.java:385)
    at weblogic.transaction.internal.ServerTransactionImpl.rollback(ServerTransactionImpl.java:3
    64)
    at weblogic.transaction.internal.TransactionManagerImpl.rollback(TransactionManagerImpl.java
    :320)
    at com.bis.dbservices.entitydao.BISEntityBean.createEntity(BISEntityBean.java:308)
    at com.bis.dbservices.entitydao.BISEntityBean_wo2ue8_EOImpl.createEntity(BISEntityBean_wo2ue
    8_EOImpl.java:536)
    at com.bis.dbservices.entitydao.BISEntityBean_wo2ue8_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:290)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
    at com.bis.dbservices.entitydao.BISEntityBean_wo2ue8_EOImpl_814_WLStub.createEntity(Unknown
    Source)
    at com.bis.dbservices.entitydao.EntityHandler.createEntity(EntityHandler.java:106)
    at com.bis.quickfindui.QuickFindServlet.doGet(QuickFindServlet.java:1387)
    at com.bis.quickfindui.QuickFindServlet.service(QuickFindServlet.java:553)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.jav
    a:1006)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletC
    ontext.java:6718)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:37
    64)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

  • Home Interface Load Balancing with user transactions

    Hi
              Im running the following Client scenario:
              * gets initial context
              * lookup for Home Interface.
              * save the Home Interface.
              * Begin User Transaction
              * Home.findByPrimaryKey(pk)
              * activate some business method
              * Commit transaction.
              * close context
              now repeat but use the saved home interface
              * gets initial context
              * get saved Home Interface.
              * Begin User Transaction
              * Home.findByPrimaryKey(pk)
              * activate some business method
              * Commit transaction.
              * close context
              It seems that once i use the Home finder under a transaction the home
              interface will stick to the first server and load balancing won't work
              (doesn't matter if its round-robin or random).
              that means that in both cases the EjbObject i use is on the same server.
              please correct me if im wrong.
              but if im right is this a weblogic bug? or maybe a feature?
              thanks
              Dror Last
              

    You will find that most engineers at BEA strong recommend NOT using UserTxns, unless you've got some
              complex nest transaction modeling that can't be done with BMT.
              From your case, it looks as if you should use a Session-bean facade between your servlets and entity
              beans; this way you set the session bean BMT attribute to whatever you wanted using
              UserTransaction; try this out and see what happens with load-balancing... we use BMT in clustered
              servers and load-balancing works great.
              Gene
              "Dror Last" <[email protected]> wrote in message news:[email protected]...
              > Im using Weblogic 5.1 / SP8
              >
              > <home-is-clusterable> set to TRUE on all beans.....
              >
              >
              > I have a big Question Mark if weblogic clustering does have load balancing
              > while the client (Servlet Engine in my case) Uses User Transactions.
              >
              > thanks
              > Dror Last
              >
              >
              > "Gene Chuang" <[email protected]> wrote in message
              > news:[email protected]...
              > > What WL version are u using, and what do you have <home-is-clusterable>
              > set to?
              > >
              > > Gene
              > >
              > > "Dror Last" <[email protected]> wrote in message
              > news:[email protected]...
              > > > Hi
              > > >
              > > > Im running the following Client scenario:
              > > >
              > > > * gets initial context
              > > > * lookup for Home Interface.
              > > > * save the Home Interface.
              > > > * Begin User Transaction
              > > > * Home.findByPrimaryKey(pk)
              > > > * activate some business method
              > > > * Commit transaction.
              > > > * close context
              > > >
              > > > now repeat but use the saved home interface
              > > >
              > > > * gets initial context
              > > > * get saved Home Interface.
              > > > * Begin User Transaction
              > > > * Home.findByPrimaryKey(pk)
              > > > * activate some business method
              > > > * Commit transaction.
              > > > * close context
              > > >
              > > > It seems that once i use the Home finder under a transaction the home
              > > > interface will stick to the first server and load balancing won't work
              > > > (doesn't matter if its round-robin or random).
              > > >
              > > > that means that in both cases the EjbObject i use is on the same server.
              > > >
              > > > please correct me if im wrong.
              > > >
              > > > but if im right is this a weblogic bug? or maybe a feature?
              > > >
              > > > thanks
              > > > Dror Last
              > > >
              > > >
              > >
              > >
              >
              >
              

  • EWT and Professional User Transaction

    Hi
    Can anyone let me know the basic difference between EWT and Professional User Transactions. Why do I always need to come to the start Menu and then proceed with EWT Transactions ?
    I find a Service attached to EWT transactions. What is this for ?
    Regards,
    Murali.

    Hi Murali,
    Professional User Transactions are the standard transactions executed in the SAP system. An Easy Web Transaction is an ITS-based transaction, which can be executed only in the SAP GUI for HTML. You need to refer to an ITS service in order to use it. This Inernet service has the HTML templates ^ can be maintained in SE80.
    ~Suresh

  • How we see Users transaction Deatails by daily wise.

    Hi,
    I want to knw each users how many transactions he added in
    each documents wise. through Drag and relate we can get but
    there is no option for  incoming and outgoing documents. how
    we will see daily how many transactions he updated. we have
    saw in  OUSR  Table in this there is no data regarding entries.
    daily wise.

    Dear Sampathdevunuri,
    You can get the Users transaction Details daily wise, by creating a small query and create a alert based on that query.
    I have written a sample query for you, which will give the total no. A/R invoices created by each user on daily basis.
    SELECT count(T0.[DocNum]) as "Total A/R Invoice", T1.[U_NAME] FROM OINV T0  INNER JOIN OUSR T1 ON T0.UserSign = T1.INTERNAL_K WHERE DATEDIFF(DD,T0.CREATEDATE,GETDATE())=0 GROUP BY T1.[U_NAME]
    You can creat an alert based on this query and set the alert to fire at the end of the day, so that you have the complete details about the total A/R invoice transactions per user.
    Also you can modify this query to get the details information about other transactions per user as per your requirement.
    Regards,
    Rakesh Pati
    SAP Business One Forum Team

  • End User Transaction for Mass Change Sales Orders

    Hello,
    Transaction MASS can be used to change sales orders using object type BUS2032, however, end users are not allowed access to MASS.
    In most other cases, the object types can be accessed by individual transactions, for example, MEMASSPO for BUS2012 and XD99 for KNA1.
    But I cannot seem to find a similar transaction for object type BUS2032, does anyone know whether one exists or how to create such a shortcut.
    Thanks,
    Jake.

    Hi
    See SAP Note 483303 - BUS2032: Only sales orders of category VBAK-VBTYP = 'C'
    Regards
    Eduardo

  • How to  monitor USER transactions

    Hi Experts
    In Portal are there any chances to maintain user based on company codes.  
    Is there any possibility to monitor the Portal USER activities (what are the transactions or reports & etc). 
    Points will be revert back.
    Rgds
    Priya

    Hi Priya,
    Pl check this you will get log files for EP users,
    1> login via j2ee visual admin -> for tht run go.jar file in cmd  (usr\sap\EPP\JC00\j2ee\admi\go.jar)
    2> login as administrator
    3> follow this link frm home page
    services  ->  log viewer service  ->  server  ->  \JC  ->  j2ee\cluster\server  ->  log  ->  system  ->  security.log  ->  search d specified user
    hope this will help.
    Regards,
    Aditya

  • Track user transactions

    Hi,
    We have a user ID that was expired a year ago. We want to know how to check the last transaction or last accessed tcode of the user. I tried Sm37 but there were no logs found.
    Thanks
    Law

    Hi Lawrance,
    Check SM20 if your system is activated trace, but this trace need to be backup regularly other wise
    It will filled up at the os level.
    hope this will give you some understanding
    Cheers,
    Harish

  • Principal Propagation - User on each system

    Hi,
    I have a scenario:
    WS consumer: JAVA -> PI 7.11 -> provider ERP (ABAP Proxy; ver. 700) where I have to use logon tickets.
    If I am to use SOAP adapters do I have to propagate user on SAP PI?
    If so, does the user (the same on 3 environments) on SAP PI has to have the same password on SAP PI as on cosumer and provider systems? 
    Could you please give me any input/best practice on the scenario?
    Thanks!

    Hi ,
    I don't know much about PP, but was going through the [guide|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/808d3048-638c-2a10-35a6-faa48e50ad59?quicklink=index&overridelayout=true]
    which specifies that this model has weakness with respect to user credentials.(page4).
    When application users are propagated to the IS (ABAP proxies only), each application user must be maintained with the corresponding execution
    rights in the IS.
    I think  you might have  already referred this:)
    Regards,
    Srinivas

  • Principal Propagation: User needs to be defined in PI???

    Hi All,
    We have a major SRM implementation using Principal Propagation(PP) for most of the interfaces. We are currently in design state. One of the things that were brought to my attention was that the user to be propagated from Sender needs to be maintained in both PI and Receiver System. As we have about 35000 users(Suppliers/internal Employees) that will be using the SRM funtionality. Does that mean i have to maintain all 35,000 users in PI also???
    Is there any other way that we can implement PP without creating these users in PI??? but create these in Receiver and Sender system only.
    Regards,
    XIer

    Hi ,
    I don't know much about PP, but was going through the [guide|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/808d3048-638c-2a10-35a6-faa48e50ad59?quicklink=index&overridelayout=true]
    which specifies that this model has weakness with respect to user credentials.(page4).
    When application users are propagated to the IS (ABAP proxies only), each application user must be maintained with the corresponding execution
    rights in the IS.
    I think  you might have  already referred this:)
    Regards,
    Srinivas

  • Complete End User transactions of Credit management and Cash Remittance

    Hi All
    Can any one please Guide me on what are all transactions the end users need to perform  in the below areas -
    1 - Collections
    2 - Credit Management
    2 - Cash Remittance
    4 - Tax Processing
    I have to give the trainings on these areas and these are very much new areas to me
    Appreciate your Quick Response
    Aadi
    Moderator
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/d2/9202b646f111d189430000e8323c4f/frameset.htm

    Hi,
    You got this message because you set check for "Permitted aging of A/R summary" on OVA8.  And you also chose to create AR summary on table T000CM.
    You can do one of following:
    1. on OVA8, make "permitted days and monthes" blank.
    2. delelte entries in table T000CM
    3. Make "permitted days and monthes" longer, and delete and re-create AR summary by FCV2 and FCV1.
    Hope it helps.

  • Call Referenced sub-process by propagated user

    Hello, gurus!
    Today a caught new problem.
    I try to call referenced sub-process from another BPM-process. I have enabled principal propagation in both processes. After that I call head process by predefined user (in example "TestUser"), but unfortunately internal referenced sub-process was called by "SAP_BPM_Service" user.
    Does anyone knows if I have any way to call referenced sub-process by predefined "TestUser" too?
    Thanks for your answers.
    Regards, Sergey.

    I try to call head process by "TestUser" which should be propagated to referenced sub-process, but in process management perspective in nwa I can see that sub-process was started by "SAP_BPM_Service" user. Do you know what I should do to fix that problem?
    Thanks for your reply!

  • Checking User Transactions

    Hi
       is there any option to check what are the transactions user has been executed., i think is there some program.,
    Regards
    Chandra

    In the VA Server Services Performance Monitor JARM tab you can get many things but not precisely this.
    The two reposnses above assume you are talking to an ABAp which is not always the case but certainly in STAD/ST03 this is available.
    What you really need is to implement CCMS collection to a CEN. There the DSR statistics are collected and you can see every transaction a user has run including whatperformance that transaction had across each server.

  • Maintain Documents on User (Transaction CRM_KW) in new CRM2007 WebUI

    Hi All,
    We are working with CRM 2007 WebUI and I would like to give the users the possibility to view their own documents. In old SAP GUI this was (and still is) possible via the transaction CRM_KW. We have set up content management and everything correctly, that is working fine, I do see some documents for users when I go into that transaction.
    Now without using transaction launcher, is there a component/logical link/assignment block somewhere to get this functionality in WebUI?
    Thanks for help
    Alex

    Have you executed a trace while a functional user executes the transaction code for the specific parameters? (i.e. document type). The trace will then show which objects are being checked; then look at the object documentation in txn Su21 to determine if there are any ways to restrict on the particular value; in some cases, if the authorization group field is being checked, additional configuration is needed in order to implement the security (Su21 will explain in detail for the particular object).

  • Propagating user identities to the IS and to receiver systems

    Hi,
    According to "SAP Security Guide XI", XI generally uses anonymous technical users:
    "The user authenticating itself for the Adapter Engine or the Integration Server is a technical user defined in the sender system."
    and
    "This implies that the identity of the user in the sender system is not generally propagated to the Integration Server."
    Is there a way to overcome, this? For instance by signing the documents? Is it possible to implement this in a way that allows the receiving system to know the sender's id?
    Regards,
    Mike

    Hello Graphicsguy123,
    You would need to first create the form ( or Widget in EchoSign) first to generate a url which you can paste it in the email being sent to customers. You would need to make sure you have a Document Cloud Enterprise Premium account in order to create a Widget. If you don't have the account, you can use the trial version to test it. Here is the link:
    Global Trial Registration | eSign services from Adobe
    -Rijul

Maybe you are looking for

  • Nothing is working

    Ive had itunes on my computer since june 2 weeks ago I downloaded itunes 6 and now my itunes wont open. Ive tried everything from rebooting my computer to uninstalling and reinstalling. No error message shows up itunes just wont open. My quicktime op

  • Validation between line items in a Document

    Dear Experts I have created a Validation to restrict the Users not to select two different Company Codes in the line item level for a particular Document Type.  The Validation is as shown below: Prerequisite : BKPF-BLART = 'SA' Check : "BSEG-BUKRS1 <

  • Recording an audio from Youtube

    I want to record just the audio of a Youtube video, save it in iTunes then burn it to a cd. Can I do this? How?

  • Timezone effects on Date and Timestamp fields in af:query component

    Hello, I'm working on an ADF application where time zone is configured as follows: * Dynamic View Layer time zone is configured in trinidad-config.xml file and bound to a session scoped value: <trinidad-config>   <skin-family>fusionFx</skin-family>  

  • I need help with this zip file so that I can let Dreamweaver do what it do.

    I need help. I bought a web design from a company called Envato. And file is zip, I heard that you use Abobe Illustrator to unzip the file, but I've tried that and got nothing. I've just download Dreamweaver with hopes that would work and again nothi