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]

How can I extract just my documents from a time machine backup?   I had to re-install Lion after the update screwed things up, the Genius Bar guy told me to re-install each App, and then transfer just my data (documents) back but didn't tell me how.  [More]
Cycle Count Entries Form not showing specific employee name in "Counted By" LOV List.But the Employee is active . Is there any setup for this activity?Hi, This is because the query is excluding the current site you are trying to modify since it [More]
So I partitioned the MAC OS drive so that part of it would be for Windows, and it told me to insert my Windows 7 disk. When Windows Install started up, it said that disk 1 partion 2 (Bootcamp) was not NFTS formatted, so to proceed, I formated just th [More]
Moved all my music from an old computer to an external HD and onto a new computer.  I was able to make the move, but now all the songs have double.  How do I correct this? I am on a PC w Vista, crappy I know.Thanks!Read other 2 answers [More]
This question sounds like a Flash/ActionScript question, but it's really a Safari question, so please bare with me. Hello, I am creating a website for an artist and she complains that nothing works. Mainly the embedded links (URLs). I tested the site [More]
Just wanted to know if anyone else noticed that. In the javadoc of java.util.regex.Pattern in the "Back references" section it says that you need to use \n to match capturing group but it does not work. To match a capturing group one need to use [More]
I am connecting my new AX however, it does not read when Airport Utility scans for the station. I attempted to set up the new AX and was able to establish the connection but not connect to the internet. I unplugged the station, and restarted my compu [More]
When visiting sites that play videos using flash, I am able to start the videos playing, but then am unable to interact with options such as fullscreen and pause. I am not encountering this problem in safari/chrome. When starting videos to play in fu [More]
Dear all,              what type of standard reports available for blocked invoices in SD. what transaction code is used for this. Regards, Devi.DHi, Transaction Code:MRBR can be used, with this you can also release the blocked invoices. Regards SDRe [More]