|
From: <php...@li...> - 2009-02-06 12:08:50
|
Hi dominik,
I am not so sure if it is desireable to allow script-specific beans within a IOC framework. Programming one bean in Groovy, the next one in Python and other beans in Java might become a maintanance nightmare.
However, the JSR 223 API allows one to create context-specific script engines, which can be injected into the system and invoked when needed.
> For this, I'm currently refactoring some parts of the
> php-java-bridge to be more losly coupled and allow the usage of
Why do you need to refactor internal classes?
> a) which services should be available to php
You can specify the bean configuration in a separate XML file (e.g.: faces-config.xml, ...), why do you need to change the web.xml or the PHP/Java Bridge code?
> b) which classes should php able to load, e.g. java.util.*,
Just attach a context handle to the JSR 233 script engine instance. PHP scripts can fetch their individual context via e.g.: $ctx=java_context()->getAttribute("context");
Regards,
Jost Bökemeier
|