Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB Overview Doubt

 
Amit Batra
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
What exactly is a native library and why would loading it in my bean lead to security problems?
 
Leonardo Borges
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A native library is a .dll, for example. Written in C or whatever language you want. And you can use JNI to access it.

The first problem of doing this is portability. The EJB Spec does not say that all containers must even allow it.

And related to security, a exception thrown by your native library may crash your container(like a divide by zero, for example).

The bottom line is, don't do it!

Cheers!
 
Amit Batra
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic