On 10/10/06, Simon Laws <[EMAIL PROTECTED]> wrote:
On 10/10/06, ant elder <[EMAIL PROTECTED]> wrote: > > Not for M2 but posting a mail so there's some record of the code...Was > messing about in the weekend and got PHP going with the Java SCA runtime. > Experimental sandbox code but could be interesting to use to get some > interaction with the PHP SCA people and maybe from that help improve the > other script language containers supported by the Java runtime. It uses > the > early access reference impl of JSR-223 and there's a very simple > helloworld > sample demonstrating an SCA component implemented in PHP. > > Ended up being quite a mission to get it working but its easy to use now. > To > run the sample you need to build container-jsr223 [1], build the > sample.php[2], download the JSR-223 RI [3], from the RI copy > php5ts.dll from jsr223-win32-i386\php5\bin to your JRE bin directory, and > when running the sample set the java.library.path system property to the > JSR-223 RI PHP install, i.e. - > Djava.library.path=C:\Java\JSR-223ea\jsr223-win32-i386\php5\bin > > ...ant > > [1] > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/ant/container.jsr223/ > > [2] > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/ant/sample.php/ > [3] http://www.jcp.org/aboutJava/communityprocess/edr/jsr223/ > > Hey ant, that's pretty cool. We have a similar, service only, i.e. no references in our case, implementation working in C++ and we need to push on and get the other half of it working. Have been waiting for the PHP implementation of SCA to go out which is done now. You can get it from http://www.osoa.org/display/PHP/SCA+with+PHP. In our case a PHP class it used to represent a service. We don't allow functions on their own to be used to implement services and we rely on annotations currently to define the component type, i.e. there are no side files. In the first instance we didn't want script writers to have to write sides files. As an integration point we will move toward side files and that is one of the challenges of taking the next step with the C++ implementation. We want to be able to populate the SCA model with information from the PHP annotations. Would be good to think about what the same level of integration in Java mena if we decide to support the PHP extension fully. Do you know if the php5ts.dll you are using is a standard php dll or has it been modified to work well with java? Regards Simon
I don't really have time to spend on this till we get our M2 out, but after thats done I'd like to try to get it working in as similar way as possible to what you guys do. Right now it has to use a .componentType side file, but I'd really like to remove that requirement for all the script languages in the Java runtime. It should be possible to get it working with PHP classes, but is there a reason you don't support functions on their own? I'm not sure if its standard PHP, there's no doc on any of this so it was pretty hit and miss. I did spend a while trying to use the regular PHP download from http://www.php.net/downloads.php but it get crashing the JVM, but I don't remember if i tired that after I figured out the copying of php5ts.dll to the JRE bin directory and setting the java.library.path system property correctly. ...ant
