• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

EJB must implement in ear file?

 
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good day,

I'm New in EJB thanks to confirm my understanding:-

1. EJB module need to be implement in .ear file format? can it hold it in .war file?
2. can i mix with the EJB code(Connect to DB_1 ) with other code which due with JPA and Hibernate(Connect to DB_2) and package it into single package?

Thanks

 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let see. From my understanding, an EJB module is a jar file. If you wan to incorporate an EJB module in a web app ... then the file needs to be an enterprise archive (ear) file. An EAR can have multiple war and jar (both EJB and app client).

For Q2, because of Q1 (different files) you can package the EJB code with your web code (war) together. Yet the EJB package names can be the same as the packages in the WAR.
 
Nakataa Kokuyo
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tsang for guidance!

Just to confirm my understanding, means i should have a single .ear file to package EJB and web module together? I'm seeking a way how to handle my case in Maven, just in case if you can enlighten me on this.
 
K. Tsang
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sure you can google for samples
 
So there I was, trapped in the jungle. And at the last minute, I was saved by this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic