From the course: Java EE: Concurrency and Multithreading
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Define the data sources in GlassFish server
From the course: Java EE: Concurrency and Multithreading
Define the data sources in GlassFish server
- [Instructor] Now let's see the demo for concurrency by using the JTA Transaction API. Now, let's understand this, that I am going to simulate a scenario here. I have only one database schema, which is test. So, I am going to create a scenario where I establish two different data sources pointing to that same database, test. And that we will see that whenever you perform transactions on multiple data sources, is the transaction management okay during concurrency programming. So, we have a set of two tables: bank_account_transaction and bank_account_transaction_log. And they're dependent tables, so if you have an entry in bank_account_transaction, only then will you ever have an entry in bank_account_transaction_log. So, the transaction ID is a foreign key in the second table which is, of course, the primary key of the first one. Do not worry about the table schema because the database script is already provided to you in the exercise folders. So, you can just run them on and have…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
Java Transaction API (JTA) transactions with concurrency4m 38s
-
(Locked)
Define the data sources in GlassFish server5m 4s
-
(Locked)
Define the session bean class for database operations6m 47s
-
(Locked)
Define the transaction processor5m 3s
-
(Locked)
Define the REST class3m 20s
-
(Locked)
Run the JTA application2m 44s
-
-