Re: ideas...
On Oct 15, 1:26 pm, Bogus Exception <bogusexcept...@gmail.com> wrote:
I'm curious as to which approaches exist for defining and running Java
code at run time in EJB3. For example, programmatically defining an
entity, or other, bean.
My program wants to take code written by a user and incorporate it
into the running system. For speed (and other?) considerations,
BeanShell appears to be an unwise choice, right? This leaves me with
crafting a complete Java class in a string, then compiling and copying
to ./deploy, right?
If BeanShell is parsed (like any other interpreted language) each and
every time it is run, then it may well be a lot slower than writing
source, compiling it, and running in the container, right?
TIA for any experiences and/or insights!
Why not have the end-user compile and upload the code? Or better yet,
use RMI's capability in that regard. BTW, it sounds like a bad idea.
Unless you have really strict and secure access. As soon as someone
can run arbitrary code on your end, then someone can run malicious
code on your end.