Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Introduction to JCA and MDB
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
HASUNUMA Kenji
September 30, 2017
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introduction to JCA and MDB
HASUNUMA Kenji
September 30, 2017
More Decks by HASUNUMA Kenji
See All by HASUNUMA Kenji
Jakarta EE: The First Parts
khasunuma
0
74
Life of our small product
khasunuma
0
53
How to adapt MicroProfile API for generic Web applications
khasunuma
0
53
Overviewing Admin Console
khasunuma
0
51
Introduction to MicroProfile Metrics
khasunuma
0
82
Basic method for Java EE Web Profile
khasunuma
0
51
Collections Framework Begineers Guide 2
khasunuma
0
93
JLS myths ~ if-then-else statement ~
khasunuma
0
78
Introduction to Date and Time API 4
khasunuma
0
98
Other Decks in Programming
See All in Programming
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
170
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
940
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2.9k
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.6k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
190
golang-bob.pdf
iwatsukayura
0
100
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
240
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
1
410
Java 27新機能 / Java 27 new features
kishida
2
210
wkhtmltopdfの次どうするか問題2026
willnet
2
1.9k
気持ちぃ〜角丸 Squircle
ryu1013
0
140
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.3k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
700
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
620
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
The Pragmatic Product Professional
lauravandoore
37
7.5k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
550
Everyday Curiosity
cassininazir
0
350
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Transcript
Introduction to JCA and MDB HASUNUMA Kenji GlassFish Users
Group Japan
[email protected]
Twitter: @khasunuma
What's JCA? • JCA (Java Connector Architecture) brings integration between
systems • JCA is also base of Java EE servers • Almost Java EE developer have been used JCA
JCA Overview External System (e.g. EIS) Java EE Resource
Adapter (.rar) Web app. (.war) Outbound Inbound Java Connector Architecture (JCA)
Contracts (1/2) since JCA 1.0 (J2EE 1.3) • Connection management
(Connection pooling) • Transaction management (w/JTA) • Security management (w/JAAS)
Contracts (2/2) since JCA 1.5 (J2EE 1.4) • Life cycle
management • Work management • Transaction inflow management • Message inflow management
Application Architecture ConnectionFactory EJB Connection External System getConnection JNDI lookup
Outbound Inbound I/F
Application c.f. JMS ConnectionFactory EJB Connection JMS broker getConnection JNDI
lookup Outbound Inbound JMS
Application c.f. JDBC DataSource EJB Connection RDBMS getConnection JNDI lookup
SQL JDBC
Programming w/JCA • Many cases, JCA resource adapter is provided
by each systems • Recently JCA is mainly used to manage message inflow • In JCA 1.7 (Java EE 7/8), properties are set by annotations
Outbound @ConnectionFactoryDefinition( name = "java:comp/env/OutboundConnectionFactory", interfacename = com.example.jca.OutboundConnectionFactory, resourceAdapter =
"some-rar", ... ) @Stateless public class ExampleMessageSender { @Resource(lookup = "java.comp/env/OutboundConnectionFactory") OutboundConnectionFactory factory; public void send(...) { try (OutboundConnection conn = factory.createConnection()) { ... } catch (Exception e) { ... } } }
Attention • Session Bean SHOULD NOT be used to listen
messages • SHOULD use Message Driven Bean (MDB) to listen messages
What's MDB? • EJB specified for listening messages • Have
a callback method and handle inbound messages provided by JCA • MDB adapts both async and sync communication
Inbound @MessageDriven( activationConfig = { @ActivationConfigProperty(propertyName = ..., propertyValue =
...), ... } ) public class ExampleMessageListener implements MessageListener { public void onMessage(Message message) { ... } } Callback method invoked by the Resource Adapter
Use case: Payara Micro • Payara Micro connects other systems
on cloud via JCA adapters; • Apache Kafka • MQTT (Mosquitto, etc.) • Amazon SQS • Microsoft Azure Service Bus
Why MQ? • System/service requirements are different each other •
Now various systems/services are integrated on cloud platforms • MQ (i.g. Async) often resolves impedance matching between each systems/services
JCA is ... • JCA (Java Connector Architecture) brings integration
between systems • JCA is also base of Java EE servers, e.g. JMS, JDBC • Almost Java EE developer have been used JCA as JDBC data source
Introduction to JCA and MDB HASUNUMA Kenji GlassFish Users Group
Japan
[email protected]
Twitter: @khasunuma