Amicuk Programming Answers

About Container-managed Transactions and Bean-managed Transactions

2015-10-11   Views:2


as the document of weblogic7.0 describe the differents of Container-managed           Transactions and Bean-managed Transactions,and in the document,It tell us           details of using Bean-managed Transactions,such as \:           import javax.nam

as the document of weblogic7.0 describe the differents of Container-managed
          Transactions and Bean-managed Transactions,and in the document,It tell us
          details of using Bean-managed Transactions,such as \:
          import javax.naming.*;import javax.transaction.UserTransaction;.....
          import java.sql.*;import java.util.*;
          UserTransaction tx = (UserTransaction)
          tx.commit() //or tx.rollback
          but how to use Container-managed Transactions?
          what is EJB's deployment descriptor? can someone tell me?
          i wonder someone will show me an example of how to use Container-managed

The replay answer
Many if not all of the WLS EJB examples use container-managed
          transactions. That's a good place to start.
          I'd also recommend that you pick up a decent EJB book. There's several
          on the market right now.
          -- Rob
          fish wrote:
          > <ejb-jar>
          > <enterprise-beans>
          > <session>
          > <ejb-name>testbean</ejb-name>
          > <home>test.test.TestHome</home>
          > <remote>test.test.Test</remote>
          > <ejb-class>test.test.TestBean</ejb-class>
          > <session-type>Stateful</session-type>
          > <transaction-type>Container</transaction-type>
          > </session>
          > </enterprise-beans>
          > <assembly-descriptor>
          > <container-transaction>
          > <method>
          > <ejb-name>EmployeeRecord</ejb-name>
          > <method-name>*</method-name>
          > </method>
          > <trans-attribute>Required</trans-attribute>
          > </container-transaction>
          > </assembly-descriptor>
          > </ejb-jar>
          > ----------------------------------------------
          > seems i have to write ejb-jar.xml like this,am i right?
          > what about <ejb-client-jar>? is it needed in this xml file?
          > thanks
          > fish

Go to See the other 5 answers

Bean-managed transaction with EJB 3.0

Category:DefaultRelease time:2015-10-11Views:130

Hi, I try to get a bean-managed transaction example running with EJB 3.0 under GlassFish v2ur2. In order to demarcate the scenario I have to get me the UserTransaction which I get from the SessionContext. I would like to use it then like: UserTransac[More]

Two phase commit and bean managed transactions

Category:DefaultRelease time:2015-10-11Views:130

To all the Transaction GURUS!           Hi guys (-and gals).           I've been doing J2EE for quite a while, but today was my first at           XA-Transactions and Bean Managed Transactions.           Why am I doing this?           ===============[More]

Container-managed / bean-managed transaction demarcation

Category:DefaultRelease time:2015-10-11Views:130

I am trying to make sure I understand container-managed and bean-managed transaction demarcation and in particular where you have one bean calling another bean. What happens where one of the beans has container-managed transaction demarcation and the[More]

About Container-managed Transactions and Bean-managed Transactions

Category:DefaultRelease time:2015-10-11Views:130

as the document of weblogic7.0 describe the differents of Container-managed           Transactions and Bean-managed Transactions,and in the document,It tell us           details of using Bean-managed Transactions,such as \:           import javax.nam[More]

Transaction management in stateless session beans.

Category:DefaultRelease time:2015-10-11Views:130

Hi all, I am using EJB 1.1. I have a statless session bean that has two methods- A and B. which does not involve any database interaction like inserting/updating/deleting the data in the database. The process flow is such the client always calls A fi[More]

Entity Bean can only use container-managed transaction demarcation?

Category:DefaultRelease time:2015-10-11Views:130

In <<Designing Enterprise Application with J2EE 2nd>> Section Enterprise Bean Transactions,it says:Entity beans can only use container-managed transaction demarcation. That means,i can not get UserTransaction from EJBContext. Is that t[More]

Bean-Managed Transaction and xDoclet

Category:DefaultRelease time:2015-10-11Views:130

Hi, i am new by xDoclet. Does anybody know, how to specify Bean-Managed Transaction by EJB using xDoclet. Thank you very much for any hint or link. --Eugen                                                                                               [More]

Bean Managed Transactions and rollback

Category:DefaultRelease time:2015-10-11Views:130

Hi Everybody, I am using Bean Managed Transactions in a Message Bean which is called every some time by an EJB3 timer. This Message Bean subsequently calls a Session Bean which uses Container Managed Transactions and uses the default transaction attr[More]

Bean Managed Transactions

Category:DefaultRelease time:2015-10-11Views:130

Dumb question? Is there a way to change one of the methods in a container-managed bean so that it is bean-managed?More specifically, I'm confused by the format for ejb-jar.xml. If I use the following to specify whether a bean is managed by the contai[More]

Can i call Bean managed EJB with transaction attribute Required New

Category:DefaultRelease time:2015-10-11Views:130

          I am calling a BeanManaged EJB which has a transaction attribute           set to Required New from a container managed bean. Does it create a new transaction           other than the Bean managed transaction. Do i really need a required ne[More]

Can i user UserTransaction  in a Container-managed transaction Bean

Category:DefaultRelease time:-0001-11-30Views:130

can i use UserTransaction to control transaction boundaries in a container-managed transaction bean method? below is the method: there is one-to-many between Employees and SalaryItem @TransactionAttribute(value = TransactionAttributeType.REQUIRED) pr[More]

I am unable to send mail from my IMAC OS X v 10.6.8. I use Airport Extreme and Use a WiFi Network.  This only happened recently but whenever I try to sent a message it says "Can't send message using the server" This is what I use an [More]
This seems to be an increasing problem and is occurring between e-mails and company websites which used to function properly. I used to think it was the fault of the website in not making a connection. But now it is occurring in e-mails which used to [More]
Our process encounters some errors when the execution time takes longer than normal, e.g. 5mins. Any help is much appreciated. Process Flow: The flow consists of 3 process, 1 long-lived process and 2 short-lived processes, let say process A, B and C [More]
Hi , If i want to find out the planning file entry for the materil , how can i find out ? please give me the table name . Transaction code i knoe MD21 , MDre & MDAB , i want to see it on table lavel . In which table i will get this information . Plea [More]
This question applies to the standalone platform edition of Message Queue v3.5 SP2 running on solaris. I have a number of durable subscribers connecting to a topic. Each & all subscriber have a selector set to filter the data. From imqadmin I can sel [More]
Hi, I have few questions on outlook integration ( CRM 4.0) which is as follows. 1) Can we integrate Email by implementing Outlook integration in CRM 4.0? I heard that we can only integrate activities and tasks with SAP and MS outlook 2) When we creat [More]
i finally was able to connect my macbook pro to my 1080p hdtv and when i started one of the 720p hd movies it looked terrible. is there a way to fix that so the movies looks like it does on my iphone or mac?Wow, you're awfully confrontational for som [More]
Hi, I am trying to remeber how to use PL/SQL code using the <ORACLE> tag in some of the pre-defined portlets. Please HELP! I tried to use this in HTML portlet <ORACLE> execute schema.some_procedure; </ORACLE> ... and it didnt work. Thanx [More]
How can I install a printer to my macbook air which has no cd port?  I have a basic hp printer.You won't need to. As long as the computer "sees" the printer it will automatically download any needed software for it. I have one of the HP wireless [More]
Hi all, Does anyone have a suggested solution to fix a key not working on my laptop? One letter on my keyboard "the letter b" has stopped working. Laptop is Satellite P300- "PSPCA-01U013" Thanks :)Hi Ricco1, The problem is that single [More]