Menu

Tree [r423] / trunk / php-java-bridge / examples / j2ee /
 History

HTTPS access


File Date Author Commit
 src 2005-01-28 jost2345 [r123] Release-1.0.8
 README 2006-03-21 jost2345 [r411] Release-3.0.8rc
 documentBean.jar 2005-08-18 jost2345 [r325] Merged from Version-2-0-7 trunc; 2.0.7 closed
 documentBeanClient.jar 2006-02-20 jost2345 [r395] Release-3.0.7a
 documentClient.php 2006-03-21 jost2345 [r411] Release-3.0.8rc
 documentClient.php4 2006-03-21 jost2345 [r411] Release-3.0.8rc

Read Me

This example uses RMI/IIOP to connect to an EJB server.  The
enterprise bean is a stateful session bean which accepts pages which
are added to the document during the session.  The document should be
created when the PHP session starts and destroyed when the PHP session
terminates.  See ../php+jsp/documentClient.php.


Installing the documentBean.jar
-------------------------------

It is assumed that you use the Sun J2EE application server and that
your server is already installed in some directory, for example in
~/SUNWappserver.  The environment variable app_server should point to
this directory.


1. Start your application server, for example with the command:

     $app_server/bin/asadmin start-domain domain1


2. Log into your application server, for example by visiting

     http://localhost:4848/asadmin

   and open

     Application Server -> Applications -> EJB Modules

   Click on "Deploy..."  and deploy documentBean.jar (a precompiled
   jar file can be found in the ../../unsupported folder).


3. Start the PHP/Java Bridge, if it is not already running.


4. Run documentClient.php, for example with the command:

     php documentClient.php 3 $app_server

   It should return "This document has 2 pages."



Notes: 

For IBM WebSphere set WAS_HOME, deploy under the JNDI name
"RMIdocument" and run the example with:
php documentClient.php 2 $WAS_HOME

For Oracle you need to deploy a .ear file, which can be created with
the command: "deploytool". Make sure to require the correct
documentBeanClient.jar which includes the stub classes, otherwise
you'll get a class cast exception in narrow.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.