Menu

[r335]: / trunk / php-java-bridge / ChangeLog  Maximize  Restore  History

Download this file

2424 lines (1631 with data), 80.7 kB

2005-08-27  Jost Boekemeier  <jostb@intern>

	* INSTALL: Rewritten

	* VERSION, php-java-bridge.spec: Version 2.0.8RC
	
	* java.c (__sleep, __wakeup): New functions to avoid problems
	described in PR1274526 and PR1202896. In a future version we might
	make java values serializable. Until then please use the JSession
	adapter (located in php_java_lib) if you want to store java values
	into the session variable.

	* server/Makefile.am: Added missing ConstructorCache.
	
	
2005-08-27  Jost Boekemeier  <jostb@intern>

	* README: Removed Sun j2ee sample server, added Oracle 10g AS and
	WebSphere 6 AS.

	* server/WEB-INF/web.xml: Use UTF encoding for WebSphere.

	* server/php/java/servlet/PhpJavaServlet.java (findCGI): Add
	separator (for WebSphere).

	
2005-08-26  Jost Boekemeier  <jostb@intern>

	* server/php/java/servlet/HttpSessionFacade.java (isNew): Use
	local variable (needed for servlet engines which check the thread context).

	* server/php/java/servlet/PhpJavaServlet.java
	(handleSocketConnection): some servlet engines override
	close. Flush the output instead.

	* unsupported/gcc3.4-broken-jni-method-lookup.patch: Obsolete, we
	don't use JNI anymore.
	
2005-08-25  Jost Boekemeier  <jostb@intern>

	* server/php/java/servlet/Context.java (removeAll): rewritten

	* server/php/java/servlet/SocketRunner.java (accept): Shutdown when an exception (e.g. security exception) occurs.

	* server/php/java/bridge/JavaBridge.java (makeClosure): Added missing method.

	* examples/gui/README: New file

	* README.MONO+NET: Corrected documentation.

	* README: Updated documentation
	
2005-08-24  Jost Boekemeier  <jostb@intern>

	* client.c (adjust_environment): Removed obsolete code.

	* java.c (clone_cfg): Check if already initialized.
	(destroy_cloned_cfg): initialize.
	(closure): correctly send map
	(call_with_exception_handler): display name is now call_global_func_with_exception_handler.

	* protocol.c (protocol_end): send context on shutdown in order to terminate redirected request.

	* server/php/java/bridge/JavaBridge.java (objectDebugDescription): Check null values.
	(makeClosure): accept name, useful if there is only one callback, e.g. closure($this, "onClose");

	* server/php/java/bridge/PhpProcedure.java (PhpProcedure): accept name.
	(createProxy): accept name.
	(setResultFromProcedure): accept name.

	* server/php/java/bridge/PhpProcedureProxy.java (PhpProcedureProxy): accept name.

	* tests.php4/callback_map.php, tests.php4/callback_name.php: New tests.
	
	* server/php/java/servlet/Context.java (removeAll): New procedure

	* server/php/java/servlet/PhpJavaServlet.java
	(handleSocketConnection): wait for ctx otherwise tomcat5 would modify
	the aquired session handle.

	* server/php/java/servlet/SocketRunner.java
	(accept): remove all contexts when we destroy the socketrunner

	* tests.php4/re-direct.php: new test which checks if the context will be destroyed correctly.

	* tests.php5/Callback.java: added missing test class.
	
	* tests.php4/reset.php: rewritten
	
2005-08-23  Jost Boekemeier  <jostb@intern>

	* bind.c (get_server_args, use_wrapper, get_server_string, test_local_server, can_fork, wait_server, start_server, exec_vm, wait_for_daemon): Pass TSRMLS for windows thread safety.

	* client.c (begin_header, handle_request, adjust_environment, try_connect_to_server): Pass TSRMLS for windows thread safety.

	* init_cfg.c.in (init_socket, init_cfg, destroy_cfg, option_set_by_user, get_servlet_context, get_sockname): Pass TSRMLS for windows thread safety.
	(get_sockname): bugfix: check the socketname, not the servlet name.
	
	* java.c (__errno): Set to 0 on windows and do not change the
	variable as it is shared.
	(clone_cfg, destroy_cloned_cfg): New procedures used to unshare
	the variables we override during channel re-direct.
	(OnIniServlet): Store the servlet context, not "On".
	(alloc_globals_ctor): initialize the re-direct vars.
	(make_local_socket_info, minit, minfo, mshutdown, rshutdown, rinit):  Pass TSRMLS for windows thread safety.
	
	* protocol.c (end, protocol_end, send_context, IS_SERVLET_BACKEND, IS_OVERRIDE_REDIRECT): Pass TSRMLS for windows thread safety.

	* server/php/java/bridge/ThreadPool.java
	(getNextRunnable): Discard failed notify. Even though we do not
	send a notifyAll, it may happen that we notify a waiting thread
	even though another thread has entered the critical section
	and has just taken over the runnable without consuming the notify.
	Consider that t1 is in wait(), t2 is running and start(r) is
	called:
	
	- t2 stands before the critical section
	- start sends notify (to t1), leaves critical section
	- t2 enters critical section, pulls runnable from the list
	- t2 leaves critical section
	- t1 leaves wait and throws an exception because runnables is empty

	If this happens, the thread count is reduced without adjusting the
	threads variable. If it happens more than THREAD_POOL_MAX_SIZE
	times, the pool stops working.
	
	(run): Adjust the threads variable if a throwable occurs. Even
	though we catch everything on a level below, problems in the pool,
	out of memory error for example or the problem in getNextRunnable
	above, may still terminate the thread.
	
	* php-java-bridge.spec, VERSION: Version 2.0.8 pre4
	
2005-08-21  Jost Boekemeier  <jostb@intern>

	* bind.c
	(get_server_args): Only append a separator if the path doesn't end
	with one.

	* client.c 
	(begin_header): Do not overwrite re-direct with re-open.
	(adjust_environment): Avoid php warnings

	* init_cfg.c.in (init_socket, init_cfg): keep the default
	socketname.
	(get_sockname): New function
	
	* java.c (OnIniSockname): The last fix broke the servlet re-direct
	which needs to switch off the local socket. We now store the
	default socketname in a separate variable and use get_sockname()
	to retrieve the value.
	(make_local_socket_info): New procedure.
	
	* php_java.h (is_cgi_servlet): New global.

	* protocol.c (end): Send the context only if there are
	statements following the re-direct.
	(setResultWith_context): New function

	* server/web.xml: Is now valid XML.

	* server/php/java/bridge/JavaBridge.java (getSession): Print a
	stacktrace if session is null.

	
	
2005-08-18  Jost Boekemeier  <jostb@intern>

	Merged from Version-2-0-7 trunc:
	
	* server/php/java/bridge/JavaBridge (ObjectToString): Use
	Util.getClass instead of ob.getClass() to avoid surprises when ob
	is null or a class.
	
	* server/php/java/bridge/Request.java (add): Index must be long,
	otherwise we get a class cast exception in coerce.  Fix copied
	from 2.0.8pre.

	* server/php/java/bridge/Response.java
	(append_for_OutBuf_getFirstBytes): Must be accessible from the
	inner class on Mono.
	(append_none_for_OutBuf_getFirstBytes): likewise.
	
2005-08-18  Jost Boekemeier  <jostb@intern>

	* bind.c (test_server): Pass sockaddr in order to implement
	override redirect.

	* client.c (set_cookie): New procedure.
	(begin_header): set the cookie from the backend, re-direct to the
	correct backend, not to 127.0.0.1.
	(handle_request): check for override redirect, for re-directs: do
	not re-open before the correct port is set.
	(adjust_environment): php 5.3 changes the header field from
	X_JAVA_BRIDGE_... to HTTP_X_JAVA_BRIDGE!?!
	(createSecureEnvironment): Store the original socket addr for
	override redirect.

	* java.c (RSHUTDOWN): free the override redirect vars.
	(session): obtain a session from the backend

	* protocol.c (get_cookies, end_session, check_context): New
	functions

	* protocol.h (IS_SERVLET_BACKEND, IS_OVERRIDE_REDIRECT): New macros
	(peer0, peer_redirected, orig_peer_saddr): New session vars for override redirect.

	* server/php/java/servlet/CGIServlet.java (run): rewritten.
	
	* server/php/java/servlet/Context.java (setSession): New method.
	
	* server/php/java/servlet/PhpJavaServlet.java (setSession): New
	method.
	(handleRedirectConnection): New method for redirect and override
	redirect.
	(handleHttpConnection): Close the io streams.
	(handleSocketConnection): Check if the client needs a session
	handle. If so, include the client and provide the requested
	information for it. -- We use a short path here: instead of
	connecting back to php, we only provide the session handle which
	the client must send back to the browser. In case we were
	re-directed to a local channel, temporarily revert the
	re-direction and execute this statement (the getSession()) via the
	HTTP tunnel.

	* server/php/java/servlet/SocketRunner.java (SocketRunner): The
	local channel socket may bind to all ports. When using
	apache/mod_jk, clients cannot directly access the tomcat server
	anyway.

	* examples/php+jsp/sessionSharing.php: Create the session before
	generating output.
	
2005-08-09  Jost Boekemeier  <jostb@intern>

	* bind.c (get_server_args): extension_dir may be configured
	dynamically, look into extension_dir/lib to load libraries and
	shared libraries (.dll's).
	(wait_server, start_server, wait_for_daemon): Start java
	automatically on win32.

	* init_cfg.h.in (CFG_LD_LIBRARY_PATH, CFG_CLASSPATH): Do not
	hardcode these values, use extension_dir/lib instead.
	
	* client.c (call_user_cb, handle_exception): pass exceptions back
	to the server.
	(setResultFromApply): rewritten

	* java.c (last_exception_get, last_exception_clear): New local
	procedures in order to emulate try/catch on php4.
	(closure): rewritten
	(check_php4_exception, call_with_handler, call_with_params,
	call_with_exception_handler, exception_handler): New procedures to
	handle exceptions in callbacks.

	* java_bridge.c (checkError): if called from java, jump right back
	to the procedure from which we were called.  This can be used to
	emulate try/catch in php4.
	(is_type): It is now possible to extend from the Java proxy and to
	override its methods.

	* php_java.h: Removed declspec(dllexport), which never really
	worked. Use gcc's autoimport, which also works with our cross
	compiler.
	(exception, php4_throw_buf, object, func, retval_ptr,
	func_params): New variables used for exception handling during apply.

	* protocol.c (Exception): Send exception to the server.
	
	* client.c (end): setCookie obsolete, we now use the context.
	(adjust_environment): rewritten.
	
	* PROTOCOL.TXT: Send exceptions to the server.

	* java.c (reset): Display a warning if reset() is called.	

	* java.c (call_function_handler4): It is now possible to extend
	from the java proxy and to override its methods.

	* examples/XML/html->text.php: New example.
	(examples/XML/DTD/xhtml-lat1.ent,
	examples/XML/DTD/xhtml-special.ent,
	examples/XML/DTD/xhtml-symbol.ent,
	examples/XML/DTD/xhtml1-strict.dtd,
	examples/XML/DTD/xhtml1-transitional.dtd): New files.

	* server/php/java/bridge/DynamicClassLoader.java
	(URLClassLoaderFactory): New internal class.
	(setUrlClassLoaderFactory): New method.
	(createURLClassLoader): create via URLClassLoaderFactory.

	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java
	(updateJarLibraryPath): rewritten
	(resolveLibraryName): New method which searches for native libraries.
	(getUrlClassLoaderFactory): New method
	(loadClass): New method
	(newInstance): Use our factory in order to search for native libraries.

	* server/php/java/bridge/JavaBridge.java
	(setException): rewritten
	(CreateObject): display a proper error message when a
	NoClassDefFoundError occured instead of returning the class to the
	client.
	(setLibraryPath): Pass the contextDir (the dynamic extension_dir) to the loader.
	(warn): New procedure.

	* server/php/java/bridge/Request (Args): accept the exception
	object from the client and re-throw in order to abort this frame.
	(begin): handle Exeption.

	* server/php/java/bridge/Util (warn, appendObject, appendArgs):
	New procedures.

	* server/php/java/servlet/PhpJavaServlet (handleSocketConnection): 
	wait for the contextRunner.
	(handleHttpConnection): rewritten
	(getContext): new procedure.
	(updateBridgeContext): replaced by getContext

	* tests.php5/Callback.java, tests.php4/callback.php,
	tests.php4/callback1.php, tests.php5/callback1.php,
	tests.php5/callback.php, tests.php5/callback.jar: New tests.

	* tests.php5/NoClassDefFound.java: added call test.
	
	* tests.php4/doesNotExist.jar, tests.php4/noClassDefFound.jar,
	tests.php4/noClassDefFound1.php, tests.php4/noClassDefFound2.php:
	New tests.

	* php_java_lib/JSession.php: Allows one to store java values into
	the $_SESSION var.

	* tests.php5/session_vars.php: Test for JSession.php.

	
2005-08-02  Jost Boekemeier  <jostb@intern>

	* client.c (adjust_environment): rewritten.

	* server/php/java/servlet/CGIServlet.java (run): Removed obsolete
	500ms delay.
	
2005-07-31  Jost Boekemeier  <jostb@intern>

	* bind.c (test_server): Close the socket if nobody is
	interested. This fixes a leak which appeared when running
	phpinfo().

	* client.c (adjust_environment): New function.
	(try_connect_to_server): Adjust environment in order to re-direct
	to a local channel.

	* protocol.c (getSessionFactory): New function.
	(send_context): New function.
	(end): Send the context.
	
	* java.c (RSHUTDOWN): free servlet_redirect.
	
	* examples/php+jsp/sessionSharing.php,
	examples/php+jsp/sessionSharing.jsp: New files.

	* server/php/java/bridge/ISession.java: New interface.

	* server/php/java/bridge/JavaBridge.java (SessionFactory): New
	class.
	(getSession): rewritten.
	(setSessionFactory): New procedure.

	* server/php/java/servlet/Context.java,
	server/php/java/servlet/ContextRunner.java,
	server/php/java/servlet/SocketRunner.java,
	server/php/java/servlet/HttpSessionFacade.java: New classes which
	implements session sharing and local channel re-directs.

	* server/php/java/servlet/PhpJavaServlet.java
	(updateBridgeContext): New procedure which sets the
	channel/session context.
	
	
2005-07-28  Jost Boekemeier  <jostb@intern>

	* README: Added note about JSP and session sharing between PHP and
	JSP.

	* client.c
	(begin_header): Added re-direct to a local channel in order to
	speed up the servlet implementation.
	(handle_request): if re-directed, temporarily change the
	java.socketname, java.hosts and java.servlet.
	
	* java.c
	(PHP_INI_BEGIN): java.log_level, java.log_file, java.java and
	java.java_home are user settings.
	(OnIniServlet, OnIniSockname, OnIniHosts, OnIniClassPath,
	OnIniLibPath): These cannot be set by the user.
	(MINFO): Display entries only if they make sense.
	
	* client.c
	(handle_request): free the m and p arguments.
	
	* examples/php+jsp/excel.php, examples/php+jsp/numberguess.jar,
	examples/php+jsp/numberguess.php,
	examples/php+jsp/numberguess.jsp, examples/php+jsp/oops.jsp,
	examples/php+jsp/oops.php: New examples.

	* server/Makefile.am: include the new examples.

	* server/php/java/bridge/JavaBridge.java
	(requestOptions): Share the options for all request instances,
	needed for re-direct.
	(bind): New from init.
		
	* server/php/java/servlet/CGIServlet.java
	(run): rewritten.
	
	* server/php/java/servlet/PhpJavaServlet.java
	(init): open a server socket for re-direct.
	(destroy): close socket
	(doGet): catch IOException, display descriptive message and throw
	servlet exception.
	
2005-07-24  Jost Boekemeier  <jostb@intern>

	* PROTOCOL.TXT: updated documentation.

	* init_cfg.c.in (option_set_by_user): new function
	(is_servlet): obsolete
	
	* java.c (get_values): check for php4, if so, return the argument
	without creating memory leaks.
	(OnIniServlet, OnIniSockname, OnIniHosts, OnIniClassPath,
	OnIniLibPath, OnIniJava, OnIniJavaHome, OnIniLogLevel,
	OnIniLogFile): It is now possible to use these in php scripts,
	e.g. ini_set("java.log_level", 4);
	
	* bind.c (test_server): java.servlet forces java.socketname to
	off.

	* java.c (inspect): new function

	* server/php/java/bridge/JavaBridge.java (inspect): new function.

	* server/web.xml: added config options.

	* server/php/java/bridge/DynamicClassLoader (newInstance): create
	a dynamic classloader with the servlet classloader as parent.

	* server/php/java/servlet/CGIServlet.java: New file.

	* server/php/java/servlet/PhpJavaServlet.java: extend fromm
	CGIServlet.
		
2005-07-17  Jost Boekemeier  <jostb@intern>

	* bind.c (get_server_args): New mono release fixes a bug, so we
	can now send the socket# to the backend.

	* client.c (setResultFromApply, begin, end): pass the cname
        (handle_request): tail call from the setResultFromProcedure into
	the handle_request loop.
	
	* PROTOCOL.TXT: pass the cname (the "php" name of the function),
	not the index#
	
	* java.c (require): call mono setLibraryPath in order to load
	CLR dll's.
	(closure): rewritten

	* java_bridge.c (result): allow passing null args.

	* protocol.c (end): new procedure
	(flush): call end.
	(ResultEnd): do not auto-flush, we jump right back into the
	handle_request and then do a tail-call to return from the
	sub-request.

	* server/RunMonoBridge.c.in: code enabled for latest mono version.

	* server/php/java/bridge/JavaBridge.java (loadMethod, CLRAssembly): new
	globals.
        (init): initialize globals
	(coerce): check for CLR
	(setLibraryPath): new procedure
	
	* server/php/java/bridge/PhpProcedure.java
	(setResultFromProcedure): pass cname

	* server/php/java/bridge/Response.java (writeApplyBegin): pass
	cname instead of pos.
	
        * examples/gui/swing-button, examples/gui/swt-button,
	examples/gui/gtk-fileselector.php, examples/gui/gtk-button.php:
	New examples.
	
2005-07-14  Jost Boekemeier  <jostb@intern>

	* server/php/java/bridge/Response.java
	(append_for_OutBuf_getFirstBytes,
	append_none_for_OutBuf_getFirstBytes): must not be private because
	methods within OutBuf reference them (needed for MONO).
	
2005-07-13  Jost Boekemeier  <jostb@intern>

	* server/php/java/bridge/JavaBridge.java (coerce): Check for PhpProcedureProxy

	* server/php/java/bridge/PhpProcedure.java: new file

	* server/php/java/bridge/PhpProcedureProxy.java: new file

	* server/php/java/bridge/Response.java (defaultValuesHook): new global
	(Response): Initialize defaultValuesHook and hook
	(reset): new method
	(flush): call reset in order to clear the response buffer ant to restore the hook.

	* tests.mono+net/gtk.php: New test

	* tests.php4/swt.php: New test
	
2005-07-12  Jost Boekemeier  <jostb@intern>

	* java.c (get_values): correctly assign variable for PHP4.
	
	* PROTOCOL.TXT: Removed optional M/F requests, added A(pply) and
	R(esult) requests. Protocol version 1.1.

	* client.c 
	(setResultFromApply): New procedure.
	(stack_elem): added variables for apply
	(begin): parse apply
	(end): parse apply

	* java.c (closure): New user function

	* java_bridge.c (result): new procedure

	* protocol.c (ResultBegin, ResultEnd): New in 1.1.

	* protocol.h (writeResultBegin, writeResultEnd): New protocol requests.

	* server/php/java/bridge/JavaBridge.java (coerce): Must be called from PhpProcedure.
	(makeClosure): New methods.

	* server/php/java/bridge/JavaBridgeClassLoader.java (getClassLoader): enabled.

	* server/php/java/bridge/Parser.java (tag, len, s, ch, mask, level,
	type, eor, blen, in_dquote, eot): Changed to private.
	(parse): check for EOF.

	* server/php/java/bridge/Request.java (add): Key must be a Long,
	otherwise we get class cast exceptions in coerce.  This bug was
	not detected until now because PHP usually generates the keys for
	us.
	(begin): Parse 'R' request, removed M/F requests.
	(handleSubRequests): New method.

	* server/php/java/bridge/Response.java (p, n, A, Ae): New strings.
	(writeApplyBegin): New procedure.
	(writeApplyEnd): New procedure.

	* server/php/java/servlet/PhpJavaServlet.java (doPut): Access load
	in a static way.
		
	
2005-07-08  Jost Boekemeier  <jostb@intern>

	* php-java-bridge.spec: Version 2.0.7pre3
	
	* VERSION: Version 2.0.7pre3
	
	* README: added note about CFG_JAVA_SOCKET_INET

	* bind.c (ineet_socket_prefix): changed to INET_LOCAL in order to
	create a local TCP socket.

	* server/php/java/bridge/LocalServerSocket (create): check for
	INET_LOCAL:

	* server/php/java/bridge/TCPServerSocket
	(create): check for INET_LOCAL:, store local flag.
	(newServerSocket): new method.
	(toString): display INET_LOCAL if necessary.

	* server/php/java/servlet/PhpJavaServlet.java 
	(init): init dynamic class loader
	(doPut): expire only at the end of the session, update load.
	
	* java.c (MINFO): display servlet status
	
	* init_cfg.c.in (get_servlet_context): Check for boolean On.

	* README: java.servlet <On|Off> is a boolean, not a string.
	
	
2005-07-05  Jost Boekemeier  <jostb@intern>

	* php-java-bridge.spec: Version 2.0.7pre2
	
	* VERSION: Version 2.0.7pre2
	
	* DynamicClassLoader.c (findResource): Fixed NP.
	
	* bind.c (get_server_args): Use extension_dir as default for
	mono.mono_home.

	* config.m4: Use withval, not enableval for --with-mono.
	Use full path for mono executable.
	
	* init_cfg.c.in: Added php wrapper.

	* java.c (MINIT): log_level, log_file, java_home and java_java
	(mono_home and mono_mono) can be set by the user (INI_ALL).
	(MINIT): set ini_last_updated early.
	(MINFO): display mono.mono and mono.mono_home entries.

	* php-java-bridge.spec: Require PHP4 for the RHEL and PHP5 for the
	FC4 RPM.

	* server/MonoBridge.c.in (usage): Correct display info.
	(main): Use full path to execute mono.

	* server/php/java/bridge/Session.java (reset): Avoid concurrent
	modification.
	
	* server/php/java/bridge/DynamicClassLoader
	(classLoaderCache): Changed type from HashMap to Hashtable in
	order to avoid synchronization problems.
	(clearCaches): New method.

	* server/php/java/bridge/JavaBridge.java
	(CreateObject): Correctly handle NoClassDefFoundError.

	* server/php/java/bridge/JavaBrideClassLoader
	(clearCaches): New method

	* tests.php4/NoClassDefFount.java: New file

	* tests.php4/noClassDefFound.php: New test.

	* tests.php4/noClassDefFound.jar: New file.
	
	
2005-07-03  Jost Boekemeier  <jostb@intern>

	* java.c (PHP_MSHUTDOWN_FUNCTION): Use EXT_GLOBAL to access cfg.
	Otherwise --enable-debug will fail.
	
	
2005-07-02  Jost Boekemeier  <jostb@intern>

	* php-java-bridge.spec: quiet ed.

	* php-java-bridge.te: Don't use base_file_read_access, which is
	broken on FC3.  Added sun java 1.5 settings.

	* server/php/java/bridge/Response.java (OutBuf): Compile with mono
	which cannot access private variables from inner classes.

2005-07-01  Jost Boekemeier  <jostb@intern>

	* bind.c (get_server_args): for_display added.

	* client.c (get_mode): pass loglevels > 4

	* java.c (get_values): php4 doesn't have RETURN_ZVAL.

	* java.ini: default log level is 2, not 3.

	* php-java-bridge: removed is_multicast, discard output of daemon
	(for FC 4).

	* php-java-bridge.spec: rewritten for FC 4.

	* php-java-bridge.te: rewritten for FC 4.

	* update_policy.sh: install the policy *before* reloading it.
	Until now one had to run the script twice!?!
	
	* server/Makefile.am: try fastjar, then jar.

	* server/php/java/bridge/DynamicClassLoader.java: removed
	reference to java.util.jar.* to avoid warnings from ecj.

	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java (DynamicJavaBridgeClassLoader): 
	don't bother adding sys urls, we'll do this in clear() anyway.
	(initClassLoader): /usr/share/java/ext added (new in FC4).
	(addSysUrls): added synchronization.
	(clear): new procedure.
	(reset): reset the state, including the cache.
	(newInstance): added synchronization.

	* server/php/java/bridge/GlobalRef.java (GlobalRef): Documentation
	added
	(clear): removed. It is not possible to recycle a global ref (its
	underlying data structure would grow without bounds).

	* server/php/java/bridge/JavaBridge.java (CreateObject): use
	cl.forName().
	(select): check for null value.
	(coerce): check for null value. If we cannot create a instance
	from the template, we have received an interface. Create a
	matching type instead.
	(Invoke): Use Util.getClass() instead of v.getClass() to avoid NP
	exceptions and surprises when object is already a class.
	(getSession): added documentation
	(reset): added documentation

	* server/php/java/bridge/JavaBridgeClassLoader.java
	(JavaBridgeClassLoader): call clear() when we recycle a loader,
	not reset. reset() is used by the API java_reset().
	(getClassLoader): obsolete
	(forName): either use Class.forName() or call loadClass directly
	when the DynamicClassLoader is used.

	* server/php/java/bridge/MethodCache.java
	(Entry): Compare symbols instead of strings.
	(hasResult): new variable
	(hashCode): cache result.
	(noCache): new token
	(get): check for noCache.
	(put): check for noCache.
	(getEntry): check for null values, return noCache if one of the
	parameters is a collection or array.
	(MethodCache): initialize noCache.

	* server/php/java/bridge/Request.java
	(PhpArray): new class

	* server/php/java/bridge/Request.java
	(GetClass): renamed to getClass.

	* tests.php4/servlet_connection_re-open.php: re-written to work
	with php4 and php5.
	
	
2005-06-28  Jost Boekemeier  <jostb@intern>

	* server/php/java/bridge/MethodCache.java: New file.

	* server/php/java/bridge/JavaBridge.java (methodCache): New global.
	(init): Use EXTENSION_DIR.
	(Invoke): Use methodCache.

	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java
	(initClassLoader): synchronized

	* server/Makefile.am (java_SOURCES):
	php/java/bridge/MethodCache.java added.
	

2005-06-27  Jost Boekemeier  <jostb@intern>

	* bind.c (test_server): set "called_from_init" only if called from
	init, corrects a bug when displaying the java status (running/not
	running).

	* java.c (PHP_MINFO_FUNCTION): pass is_local.

	* server/Makefile.am: New file from Makefile_unix.am

	* server/Makefile.in: Removed

	* server/Makefile_unix.am: Removed.

	* server/Makefile_windows.am: Removed.

	* server/configure.in (MONO_BRIDGE_EXE): New global.

	* server/php/java/bridge/DynamicClassLoader (findResources):
	renamed enum to enumeration because "enum" is a java 1.5 keyword.

	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java
	(initClassLoader): Do nothing if initialized.

	* server/php/java/bridge/ThreadPool (Delegate): Compiles with GNU
	Java.

	* tests.php4/sendProperties.php: New test.
	

2005-06-26  Jost Boekemeier  <jostb@intern>

	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java: 
	(updateJarLibraryPath): add urls before sysUrls.
	(addSysUrls): append at the end of the list.
	(newInstance): rewritten

	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java:
	(run): add cast to DynamicJavaBridgeClassLoader. This is safe
	because run is only called from the standalone container, not from
	the servlet.
	(init): correctly initialize ThreadPool.
	(coerce): create the correct target type. Otherwise we would
	create and pass e.g. a Hashtable when a Properties object is
	required.
	
	* server/php/java/servlet/PhpJavaServlet.java:
	(doPut): update the in and out from the servlet context. Catch all
	throwables and shut down the connection.
	
2005-06-25  Jost Boekemeier  <jostb@intern>

	* java.c (PHP_RSHUTDOWN_FUNCTION): shutdown servlet connection.
	
	* protocol.c (protocol_end): shutdown servlet connection.

	* server/natcJavaBridge.c (initGlobals): disabled for 2.0.7
	
	* server/php/java/bridge/JavaBridge.java:
	(run): Create a JavaBridgeClassLoader from the context.
	(initGlobals): disabled for 2.0.7.  This method was used by the
	native code in order to set the UID and GID and the
	phpConfigDir. Since we now support servlet engines and application
	servers, we want something more general for the next version.
	(init): Temporarily added reference to ThreadPool until
	BridgeThread is checked in.
	(JavaBridge): Don't use ClassLoader, which isn't known.
	
	* server/php/java/bridge/JavaBridgeClassLoader: rewritten.  This
	class is a bridge now.

	* php-java-bridge/server/php/java/bridge/TCPServerSocket.java
	(TCPServerSocket): do not call initGlobals anymore.
	
	* server/php/java/bridge/DynamicJavaBridgeClassLoader.java: 
	(newInstance): new procedure.

	* server/php/java/bridge/ThreadPool.java: New file.
	
	* server/php/java/bridge/Util.java
	(EXTENSION_NAME): must be accessible from the servlet.
	(doPut): properly shut down the connection.
	

2005-06-23  Jost Boekemeier  <jostb@intern>

	* server/php/java/bridge/JavaBridge.java:
	(JavaBridge): name thread "JavaBridge"
	(classic_classloader): obsolete
	(createJavaBridgeClassLoader): obsolete
	(initGlobals): initialize poolSize from servlet or from
	System.properties if not already initialized

	* server/php/java/bridge/ClassicJavaBridgeClassLoader.java: obsolete
	
	* server/php/java/bridge/JavaBridgeClassLoader.java:
	(Bridge): added documentation, create a DynamicJavaBridgeClassLoader.

	* server/php/java/bridge/Util.java:
	(THREAD_POOL_MAX_SIZE): New global, initialized from system
	property "php.java.bridge.threads".

	* server/php/java/servlet/PhpJavaServlet.java
	(init): Init Util.THREAD_POOL_MAX_SIZE from the servlet context.
	
	* server/php/java/bridge/GlobalRef.java
	(clear): disabled 

	
2005-05-22  Boekemeier <jostb@intern>

	* tests.php4/xmlTransform.php: Test rewritten

	* java.c (iterator_dtor): The dtor may be called after rshutdown:
	check if jenv is still there. This bug appears on windows only.

	* tests.mono+net/sample_lib.cs: Test rewritten.

	* tests.mono+net/sample_lib.dll: re-generated

	* tests.mono+net/load_assembly.php: Test rewritten
	
2005-05-21  Boekemeier <jostb@intern>

	* server/php/java/bridge/JavaBridge.java (getSession): Timeout in
	s.

	* ABOUT.HTM: updated from index.html

	* java_bridge.c (php_java_call_function_handler): mono string must
	be zero terminated.
	
2005-05-16  Boekemeier  <jostb@intern>

	* multicast.c (init): return error code if semaphores are not
	available.
	(php_java_multicast_backends_available): check error code.
	
	* php-java-bridge.te: Temporarily allow semaphores, until the new
	load balancer code is in place.
	
	* VERSION, php-java-bridge.spec: updated version to 2.0.6
	
	* README: dl() works again since 5.0.4.
	
	* test.php: dito

	* tests.php4/cache.php, tests.php4/utf8-2.php: added dl().

	* php-java-bridge 2.0.6 released
	
	
2005-05-15  Boekemeier  <jostb@intern>

	* INSTALL.WINDOWS: updated.

	* README: updated.

	* bind.c (test_server): zero out saddr (for old bsd).
	(java_test_server): likewise
	(java_test_server_no_multicast): likewise

	* java.c (PHP_MINIT_FUNCTION): likewise

	* multicast.c (php_java_init_multicast): likewise
	(php_java_multicast_backends_available): likewise
	(php_java_send_multicast): likewise

	* protocol.c: likewise

	* java.c (PHP_MINFO_FUNCTION): suppress obsolete entries on windows

	* multicast.c (php_java_semun): replaces union semun which is
	pre-defined on BSD
        (php_java_multicast_backends_available): rewritten for BSD.
	(php_java_sleep_ms): not used on windows, which doesn't have
	timeval.

	* php-java-bridge: start only two backends
	
	* client.c (setResultFromString): Avoid signedness warning
	(setException): likewise
	(GET_RESULT): likewise
	(begin): likewise

	* server/php/java/bridge/JavaBridgeClassLoader.java (findClass):
	verbose error message

	* php-java-bridge 2.0.6 released (windows version only)
	
2005-05-14  Boekemeier  <jostb@intern>

	* README: updated.

	* server/php/java/bridge/JavaBridge.java
	(next): Fixed typo.
	(ObjectToString): Use "[" instead of "<".  When displaying
	unencoded error strings a browser might confuse the "<" with a tag
	start.
	(getSession): Timeout was meant as seconds, not ms. The previous
	code destroyed the session 1440ms after creation.
	
	* server/php/java/bridge/JavaBridgeClassLoader.java
	(findClass): Verbose error message.

	* bind.c (java_test_server_no_multicast): Add a warning if session
	is lost. In any case, try to create a session on a local server
	first, then try multicast backends.
	
2005-05-13  Boekemeier  <jostb@intern>

	* multicast.c (enter, leave, init): New functions.
	(php_java_multicast_backends_available): Protect critical section.
	
2005-05-12  Boekemeier  <jostb@intern>

	* server/php/java/bridge/JavaBridge.java (next): prevent loop;
	object.getClass() returns the same object if object is
	java.lang.Class.

	* tests.php4/testClass.php: new Test for above fix.
	
	* server/php/java/bridge/TCPServerSocket.java (create):
	moved error handling to Listener.java
	
	* server/php/java/bridge/Listener.java (run): rewritten.
	(listen): Error handling from TCPServerSocket.java and close the
	multicast socket after an error so that the clients don't detect
	an open socket and interpret it as if multicast backends are
	available.

	* multicast.h (MAX_TRIES): Now 12 (from 120).

	* multicast.c (php_java_recv_multicast): Assume 30ms for a round-trip (from 1ms).
	(php_java_multicast_backends_available): Do not rely on socket defaults.
	(php_java_init_multicast): Switch off MC_LOOP, which is not necessary.

	* bind.c (java_test_server_no_multicast, java_test_server):
	rewritten; issue a warning after we could not connect to a backend
	after MAX_TRIES and continue.
	
	
2005-05-11  Boekemeier  <jostb@intern>
	
	* multicast.c
	(php_java_sleep_ms): New function.
	(php_java_multicast_backends_available): New function
	
	* multicast.h (MAX_TRIES, MAX_PENALTY, LOAD_PENALTY, MAX_LOAD):
	New consts

	* multicast.h (GROUP_PORT): Changed to 9168.

	* server/php/java/bridge/Listener (GROUP_PORT): Changed to 9168.
	
	* bind.c (java_test_server): Do not share a single mc socket among
	all instances.
	
	* init_cfg.c.in (java_init_cfg, java_destroy_cfg): Do not share a
	single mc socket among all instances.

	* init_cfg.c.in (java_init_cfg): Check if multicast backends are
	available.
	
	* bind.c (java_test_server, java_test_setver_no_multicast): In the
	worst case all backends are busy and wait up to MAX_PENALTY. Code
	rewritten.

	* multicast.c (php_java_recv_multicast): Use 1ms response timeout.
	
	* php_java.h (mc_socket): Renamed to have_mc_backends.

	* server/php/java/bridge/JavaBridge.java (run): Notify Listener.
	
	* server/php/java/bridge/Listener.java (LOAD_PENALTY, MAX_LOAD):
	New consts
	(run): Do not respond if load gets too high.

	* tests.php4/multicast.php: New test.
	

2005-05-09  Boekemeier  <jostb@intern>
         
	* server/php/java/bridge/JavaBridge.java
	(load, getLoad): changed to short
	(loadLock): Obsolete
	(run): Removed obsolete synchronized.

	* server/php/java/bridge/Listener.java
	(createResponse): load changed to short

	* server/php/java/bridge/JavaBridge.java
	(checkAccessible): New method
	(Invoke, GetSetProp): Use checkAccessible instead of doing
	everything on top-level.

	(getSession): set timeout.

	* server/php/java/bridge/Session.java
	(Session): Use Hashtable instead of Hashmap to synchronize the
	put/get/remove against each other.
	
2005-05-09  Boekemeier  <jostb@intern>

	* server/php/java/bridge/TCPServerSocket.java
	(create): Make IOExceptions in the multicast listener non-fatal.
	See PR1198286.

2005-05-07  Jost Boekemeier <jostb@intern>

	* ABOUT.HTM: Updated from index.html

	* README: Updated.

	* java.c (require): New function.
	(java_require): Alias for "java_set_library_path"
	(java_set_library_path): Use require.
	(java__destruct): Removed debug code.

	* update-about.sh: New file

	* server/php/java/bridge/JavaBridge.java
	(canModifySecurityPermission): New global.
	(MATCH_VOID_ICASE, MATCH_VOID_CASE): New symbols.
	(FindMatchingInterface, FindMatchingInterfaceVoid,
	FindMatchingInterfaceForInvoke,
	FindMatchingInterfaceForGetSetProp): New classes.
	(ClassIterator): rewritten to use FindMatchingInterface.
	(GetSetProp, Invoke): rewritten to use setAccessible(true). If
	that fails, because of security restrictions, re-start with the
	appropriate FindMatchingInterface thunk.  But in the usual case
	the performance should be much better.
	(run): Log connection close.
	
	* server/php/java/bridge/JavaBridgeClassLoader.java
	(updateJarLibraryPath): Renamed from setJarLibraryPath.
	(findClass, findResource): Re-added log messages.
	(findClass): add to the classes hash in the correct path.

	* server/php/java/bridge/LocalServerSocket.java (accept): Display bridge instance.
	
	* server/php/java/bridge/TCPServerSocket (accept): Display bridge instance.

	* server/php/java/bridge/Response.java (getFirstBytes): New method.
	(flush): Show only first bytes in debug output.

	* php-java-bridge/tests.php5/loadLib.php: Display test result.
	
	
	
	
2005-05-01  Jost Boekemeier <jostb@intern>

	* server/php/java/bridge/JavaBridgeClassLoader.java 
	(classesBlackList): New global.
	(resourcesBlackList): New global
	(findClass): Do not search sysurls if blacklisted.
	(findResources): Do not search sysurls if blacklisted.
	
	* server/php/java/bridge/JavaBridge.java (getInstance): Store
	args.

	* server/php/java/bridge/JavaBridge.java (findMatchingInterface):
	Search superclasses.
	
	* bind.c (java_get_server_args): Fixed typo, the displayed info
	was incorrect.
	
2005-04-30  Jost Boekemeier <jostb@intern>
	
	* ABOUT.HTM: New file.

	* multicast.c (php_java_recv_multicast): Use 1s timeout. Solaris9
	on X86 doesn't seem to support ms timeout!?
	
	* java.c (java_get_session): Allow external sessions.

	* multicast.c (java_test_server_no_multicast): Always use the
	backend stored in the session.

	* java.c (java_get_session): Pass gc_maxlifetime as default
	timeout to the session.

	* php-java-bridge: Start only 4 backends.  Users can add
	additional backends if they want.

	* php-java-bridge.spec: Updated comment.

	* server/php/java/bridge/JavaBridge.java (run): expire session.

	* server/php/java/bridge/Session.java (getSession): Added timeout.
	(expire): New procedure.

	* server/php/java/bridge/Listener.java (createResponse): Give idle
	backends a chance.
	
	
2005-04-29  Jost Boekemeier <jostb@intern>

	* VERSION, php-java-bridge.spec: New version

	* INSTALL.WINDOWS, INSTALL, README: update version

	* PROTOCOL.TXT: Bit 0 is now reserved.

	* README: Updated from index.html

	* bind.c (java_get_server_args): If backend pool (socketname is
	off), show the command to add another backend to the pool.
	(java_test_server): Check local server first, special init
	handling for local server autostart.
	(java_test_server_no_multicast): New function used for
	java_get_session().

	* client.c (stack_elem): New struct.
	(parse_ctx) maintain a container stack.
	(begin): Use a real stack for multi-dimensional arrays.
	(end): pop
	(handle_request): init stack

	* client.c (try_connect_to_server): Do not open a connection from
	the garbage collector callback.
	(java_connect_to_server_no_multicast): New function for
	java_get_session().
	(java_connect_to_mono_no_multicast): New function for
	mono_get_session():

	* java.c (PHP_RINIT_FUNCTION): Throw error if connection open.
	(PHP_RSHUDOWN_FUNCTION): Set is_closed flag.
	(java_set_file_encoding): New public function.
	(java_get_session): Rewritten.
	(php_java_alloc_globals_ctor): init is_closed flag.

	* multicast.c (readInt): New function.
	(writeInt): New function.
	(php_java_init_multicast): Fixes for Solaris and MAC OSX
	(php_java_send_multicast): Send current time.
	(php_java_recv_multicast): No-response timeout to 90ms; gives the
	garbage collector a chance. Discard broken or timed out packets.

	* multicast.h (MAX_LOAD): Changed to 12 (from 20)

	* php-java-bridge (inst): service status command works again.
	(is_multicast): start 5 backends if socketname is switched off.

	* php_java.h (is_closed): New global
	(session_is_new): New global

	* update_policy.sh.in (setfiles): tag java.libdir/lib

	* server/MNakefile_unix.am: Added php/java/bridge/Listener.java

	* RunJavaBridge.c.in: Updated to support multicasts.

	* server/php/java/bridge/JavaBridge.java (fileEncoding): New global.
	(setResult): Use fileEncoding.
	(setFileEncoding): New function.
	(select): Use fileEncoding
	(coerce): Use fileEncoding.
	
	* server/php/java/bridge/JavaBridge.java
	(coerce): coerce collection to map.
	(ClassIterator): New Class.
	(ObjectClassIterator): New Class
	(ClassClassIterator): New Class
	(Invoke): Rewritten to use iterator
	(GetSetProp): Rewritten to use iterator

	* server/php/java/bridge/JavaBridge.java
	(getSession): Rewritten

	* server/php/java/bridge/JavaBridgeClassLoader.java
	(JavaBridgeClassLoader): Must start with an empty list for
	jpackage compatibility. User is required to name the .jar files
	explicitly (via java_set_library_path).
	(findClas): New method for backwards compatibility.
	(findResource): New method for backwards compatibility.
	(setJarLibraryPath): If .jar file is not absolut, search sys
	directories (/usr/share/java and php-config-dir/lib/)
	(initClassLoader): Do not add .jars anymore.
	(addSysUrls): New function.
	(classes): Hash re-added.  It was thrown out in 2.0.5 when we
	extended from URLClassLoader.

	* server/php/java/bridge/Listener.java (feature): New global autoconf var.
	(createResponse): Send back timestamp.
	(run): timestamp

	* server/php/java/bridge/Parser.java (bridge): New global.
	(CALL_BEGIN): Display debug as UTF8 data
	(CALL_END): Display debug as UTF8 data

	* server/php/java/bridge/ParserString.java (getUTF8StringValue): New function.
	(toString): Use UTF8 encoding

	* server/php/java/bridge/Request.java (push): Do not threat
	non-composite arguments that follow a composite as composites.

	* server/php/java/bridge/Response.java (Response): Use our fileEncoding.
	(setResult): pass fileEncoding
	(getEncoding): new function.
	(getBytes): new function.
	(writeString): new function.
	(flush): Display output in UTF8
	
	* server/php/java/bridge/TCPServerSocket.java 
	(findFreePort): New function
	(TCPServerSocket): If port==0, use findFreePort

	* server/php/java/bridge/Util.java
	(UTF8): New const
	(println): Display output in UTF8
	
	
2005-03-27  Jost Boekemeier <jostb@intern>

	* VERSION, php-java-bridge.spec: New version
	
	* multicast.c: Added windows ifdefs 

	* php-java-bridge 2.0.5 released.

2005-03-27  Jost Boekemeier <jostb@intern>

	* multicast.c, multicast.h: New files

	* bind.c (test_server): New function.

	* client.c (begin): Removed obsolete GET_RESULT.
	(try_connect_to_server): pass down spec (M for Mono)
	(java_connect_to_mono): New function

	* config.m4: multicast.c added.

	* init_cfg.c.in: Init multicast socket.

	* server/php/java/bridge/JavaBridge.java (ObjectToString): New function.

	* java.c (java_monoclass): Removed dup.
	(__tostring): The automatic type conversions now use
	ObjectToString. -- We want to avoid support calls when someone
	attempts to "format" binary data e.g.: echo $byteArrayOutputStream + " ".
	(cast): dito.

	* java_bridge.c (php_java_call_function_handler): Check for mono
	object, send out a multicast to find an Mono or NET VM. 
	
	* parser.c (parse): <P> must call BEGN, not END. This fixes a bug
	in the 2.0 protocol which was not able to parse arrays into PHP 4.

	* server/php/java/bridge/Parser.java (parse): dito.

	* server/php/java/bridge/JavaBridgeClassLoader.java: Inherit from
	URLClassLoader.

	* server/php/java/bridge/Request.java (push): Array: An empty array is
	not a null argument.

	* tests.mono+net/load_assembly.php: Fixed typo.

	* tests.mono+net/params.php: Copied from parms.php
	
	* tests.mono+net/parms.php: Removed.

	* tests.php5/ShowResourses.java, tests.php5/showResources.jar,
	tests.php5/showResources.php: New tests.

	* tests.php5/arrayArray.php4: New PHP4 array test.

	* tests.php5/printToOutputStream.php: New test

	* server/php/java/bridge/TCPServerSocket.java (create): Start listener.

	* server/php/java/bridge/Listener.java: New file.

	* server/php/java/bridge/JavaBridge.java (getLoad): New function.
	(run): Calculate load.
	(loadLock): Lock object

	* php-java-bridge.multicasts.te: New file

	* tests.php4/cache.php, tests.php4/utf8.php,
	tests.php4/utf8-2.php, tests.php4/utf8-3.php,
	tests.php4/xmlTransform.php, tests.php4/sendArray.php,
	tests.php4/sendHash.php: New files

	* tests.php5/loadLib.php, tests.php5/utf8.php: New tests.
	
2005-03-15  Jost Boekemeier <jostb@intern>

	* java.c (php_java_jsr_class_class_entry): Obsolete.
	(mono, mono_class, monoclass): New methods.
	(php_java_call_function_handler4): Mono support added.
	(PHP_MINIT_FUNCTION): Mono support added.

	* server/php/java/bridge/JavaBridge.java (select): Prefer more
	specific args.

	* tests.mono+net/bench.php, tests.mono+net/excel_antitest.php,
	tests.mono+net/helloworld.php, tests.mono+net/load_assembly.php,
	tests.mono+net/params.php, tests.mono+net/parms.php,
	tests.mono+net/sample_lib.cs, tests.mono+net/sample_lib.dll,
	tests.mono+net/stack.php: New tests.
	
2005-03-13  Jost Boekemeier <jostb@intern>

	* php_java_snprintf.c: New file

	* protocol.c: Use php_java_snprintf() in order to avoid surprises
	with certain locales (DK locale formats 1234.00 as 1.234,00).

	* protocol.c (PRECISION): New const.
	(Double): Use precision.

	* config.m4: Add php_java_snprintf.c

	* client.c (begin): Use send_string_to_double in order to avoid
	surprises with certain locales.

	* php-java-bridge 2.0.4 released.
	
2005-03-11  Jost Boekemeier <jostb@intern>

	* INSTALL.WINDOWS: java.hosts and module version supported. CGI
	version still recommended.

	* bind.c (java_test_server): java.hosts for windows.

	* client.c (try_connect_to_server): new function.
	(java_connect_to_server, java_try_connect_to_server): Use it.

	* protocol.c (GROW_QUOTE): Didn't work if len < 10.
	(replaceQuote): Spell "&quote;" as "&quot;"
	(java_createSecureEnvironment): Store server_name.
	
	* java.c (PHP_RSHUTDOWN_FUNCTION): Free server_name.
	(java_get_server_name): Use java_try_connect_to_server.
	
	* php_java.h (closesocket): Alias for close on windows in order to
	shut down the windows socket.

	* php-java-bridge.spec, VERSION: New version
		
	* php-java-bridge 2.0.3 released
	
	
2005-03-09  Jost Boekemeier <jostb@intern>

	* PROTOCOL.TXT: Document Bit 0 as reserved.

	* parser.c (parse): Removed blob.

	* protocol.c (GROW): Grow by no less than required size.
	(replaceQuote): &amp must be quoted, too.
	(String): Require _len.
	(String): Do not use sprintf to print the string, it may binary
	data.

	* server/php/java/bridge/JavaBridge.java (setResult): Do not
	convert binary data into a string.
	
	* server/php/java/bridge/Parser.java (parse): Removed blob.

	* server/php/java/bridge/Request.java (begin): Do not convert
	binary data into a string.

	* server/php/java/bridge/Response.java (OutBuf): New inner class
	replaces StringBuffer in order to deal with binary data.

	* tests.php5/binaryData.php, tests.php5/BinaryData.java,
	tests.php5/binaryData.jar: New tests.

	* tests.php5/session.php: Added dl().
	
	* java.c (java_get_server_name): New user function.

	* README: Document java_get_server_name.

	* php-java-bridgge.spec, VERSION: New version
	
	* php-java-bridge 2.0.2 released. It replaces 2.0.1 which was not
	able to deal with binary data.
	
	
2005-03-06  Jost Boekemeier <jostb@intern>

	* server/Makefile_unix.am: Updated sources list.
	
	* php-java-bridge 2.0.1 released
	
	
2005-03-06  Jost Boekemeier <jostb@intern>

	* java.c (java_session_get): Renamed to java_get_session.
	(java_class_functions): Renamed to php_java_class functions in
	order to check for java objects.
	(call_function_handler): Renamed to
	php_java_call_function_handler4.
	
	* tests.php5/session.php: Renamed java_session_get to
	java_get_session.
	
	* java_bridge.c (is_type): Use php_java_class_functions and
	php_java_call_function_handler4 (for php4) to determine if object
	is a java object.
	(is_java_type): Obsolete.
	(writeArguments, writeArgument, php_java_invoke): Pass additional
	boolean to ignore non-java objects.

	* java.c (java_get_session): Accept $_SESSION variable and ignore
	all non-java objects.

	* INSTALL.WINDOWS: New file.

	* php-java-bridge.spec, VERSION: Updated version.

	* java.c (java_last_exception_get, java_last_exception_clear, java_set_library_path, java_instanceof): Re-enabled.
	
	
2005-03-05  Jost Boekemeier <jostb@intern>

	* server/php/java/bridge/Session.java: New file.
	
	* tests.php5/session.php: New test.

	* PROTOCOL.TXT: Renamed Unref to Destroy.

	* client.c (setResultFromException, setResultFromObject): Do not
	store head of resource list but the object handle so that we can
	store java values in the $_SESSION var. Remove obsolete resoure
	list.
	
	* java_bridge.c (php_java_destructor): No longer necessary.
	
	* java.c (le_jobject): No longer necessary.

	* client.c (is_java_type, is_type): New functions.
	(java_get_jobject_from_object): Use is_type, return 0 if object is not a java object.
	(php_java_invoke): Issue a warning if received a non-java object.
	
	* java.c (check_type): Renamed to is_type and moved to client.c
	(java_session_get): New function.
	(MINIT): register_list_destructors no longer necessary.
	
	* parser.c (parse): Renamed VOID to VOJD. Reason: winsock2.h
	exports a VOID type... oh billy boy...
	(parse): Use ssize_t for socket operations.
	(parse): Use recv instead of read (for winsock2).
	(parse): Add Solaris' errno=EINTR nonsense.
	(parse): Correct typo in blob handling.

	* server/php/java/bidge/Parser.java (parse): Updated with code from parser.c.
	
	* server/php/java/bridge/*.java: Replaced all Hashtables by HashMap in order
	to store null values.

	* server/php/java/bridge/JavaBridge.java (getSession): New method

	* server/php/java/bridge/JavaBridge.java
	(Invoke, GetSetProp, CreateObject): Removed obsolete "connection
	abort" handler. Store candidates instead of matches for error
	reporting.

	* server/php/java/bridge/GlobalRef.java (get): Throw NullPointer
	if value is null (we do not store null values in the global ref, a
	null is represented as id="0" or id="").

	* server/natcJavaBridge.c (send, recv): Add solaris' EINTR handling.

	* protocol.c (flush): Use send instead of write (for winsock2).
	(flush): Add slowlaris EINTR handling
	
	* bind.c, client.c, java_bridge.c: Add MINGW32 #ifdefs.

	* protocol.h: Default level is now 2 (on unix).

	* protocol.c (replaceQuote): Fixed typo; store correct len and terminate with 0.

	* update_policy.sh.in (EXTENSION_DIR): Replace all values in a line.

	* examples/clients/README, examples/clients/getProperties.py,
	examples/clients/getProperties.scm,
	examples/clients/listToArray.scm,
	examples/clients/formatArray.xsl: New client examples written in
	Scheme and Python.

	* server/RunJavaBridge.c.in (usage, main): Updated for 2.0.0
	
	
2005-02-13  Jost Boekemeier  <jostb@intern>

	* PROTOCOL.TXT: New file

	* bind.c (java_test_server): Removed reference to jni

	* java.c (PHP_RSHUTDOWN_FUNCTION): Removed jni.
	(java_last_exception_get): disabled
	(java_last_exception_clear): disabled
	(java_set_library_path): disabled
	(java_instanceof): disabled 
	(php_java_alloc_globals_ctor): Removed jni

	* java_bridge.h, php_java.h: Removed jni

	* java_bridge.c, client.c: Removed jni, new protocol added

	* protocol.c, parser.c, parser.h: New files.

	* protocol.h: Removed JNI protocol, added new XML protocol.

	* proxyenv.c: Removed

	* config.m4: Added protocol.c, parser.c
	
	* server/JavaBridge: Removed

	* server/natcJavaBridge.c: Removed JNI protocol.
	
	* server/php/java/bridge/GlobalRef.java,
	server/php/java/bridge/IDocHandler.java,
	server/php/java/bridge/JavaBridge.java,
	server/php/java/bridge/JavaBridgeClassLoader.java,
	server/php/java/bridge/Parser.java,
	server/php/java/bridge/ParserString.java,
	server/php/java/bridge/ParserTag.java,
	server/php/java/bridge/PhpMap.java,
	server/php/java/bridge/Request.java,
	server/php/java/bridge/Response.java,
	server/php/java/bridge/Util.java: New files

	* server/Makefile_unix.am: Compile new bridge classes.

2005-02-05  Jost Boekemeier  <jostb@intern>
	
        * php-java-bridge 1.0.8 released
	
2005-02-04  Jost Boekemeier  <jostb@intern>

	* INSTALL: document worker MPM

	* client.c, java.c: ZTS

2005-02-03  Jost Boekemeier  <jostb@intern>

	* server/JavaBridge.java (load, findClass): Store reason for
	failure.
	
	* tests.php5/ArrayArray.java, tests.php5/arrayArray.jar,
	arrayArray.php: New tests.

	* php-java-bridge.fc: Removed

	* php-java-bridge.fc.in: New from php-java-bridge.fc

	* Makefile.frag (install_policy): Removed

	* update_policy.sh.in: New from Makefile.frag

	* INSTALL, README: Section about SELinux updated.

	* config.m4: Create php-java-bridge.fc and update_policy.sh.

	* php-java-bridge.te: Updated.

	* php-java-bridge.spec: Updated SELinux section.

	* examples/j2ee/globals.php, examples/j2ee/README: Cleaned up.
	
	* tests.m4/function_checks.m4 (sem_init): Add real-time lib if
	necessary (solaris x86).
	
2005-02-01  Jost Boekemeier  <jostb@intern>

	* server/JavaBridge.java (findResources): New method.
	
	* java.c (iterator_current_key, init_current_data): PHP does not
	necessarily return "clean" zvals. Zero out the allocated zval so
	that setResultFromObject can initialize it properly.  This fixes a
	bug in the iterator interface which was not able to iterate over
	arrays of non-primitive types.

	* java.c (javaclass): New method for jsr223 compatibility.
	(java_class_functions): Terminate array with a NULL entry.
	(create_exception_object): New from parent in order to implement
	object casting.
	(PHP_MINIT_FUNCTION): Use create_exception_object.
	
	
2005-01-28  Jost Boekemeier  <jostb@intern>
	
	* java.c (PHP_MINIT_FUNCTION): For java_class, javaclass and
	javaexception: Do not override parent methods with themselfs. PHP
	5.0.3 doesn't like that...
	
	* README: Updated windows install description.
	
	* config.m4: Embedding into PHP works again.  Use m4_include so
	that autoheader scans the included files.
	
	
2005-01-27  Jost Boekemeier  <jostb@intern>
	
	* tests.php5/exception.php: Extract cause.
	
	* README: Note about 5.0.3 dl() issue added.

	* test.php: Output phpinfo().

	* bind.c (use_wrapper): New function; we must call the SELinux
	wrapper if it exists.
	(java_get_server_string): New function.

	* java.c (get_server_args): Removed.
	(PHP_MINFO_FUNCTION): Use java_get_server_string instead of
	get_server_args.

	* php_java.h (java_get_server_args): Replaced by
	java_get_server_string.
	
	
2005-01-26  Jost Boekemeier  <jostb@intern>

	* INSTALL, README: Security Enhanced Linux (SEL) supported.

	* README: Removed support for Mac OSX. Recommend RHEL/IBM JDK1.4.1
	on Mac/PPC instead.
	
	* unsupported/gcc3.4-broken-jni-method-lookup.patch: New file.
	
	* unsupported/php5-crash-in-evaluator-shutdown_workaround.patch:
	Moved here.
	
	* examples/bench/bench.php, examples/bench/excel_antitest.php,
	examples/bench/exceltest.jar, examples/bench/ExcelTest.java,
	examples/bench/README: New files

	* examples/j2ee/documentBean.jar,
	examples/j2ee/documentClient.php, examples/j2ee/globals.php,
	examples/j2ee/README, examples/j2ee/src/DocumentBean.java,
	examples/j2ee/src/DocumentHome.java,
	examples/j2ee/src/DocumentRemote.java,
	examples/j2ee/src/Page.java, examples/j2ee/src/README,
	examples/j2ee/src/META-INF/ejb-jar.xml,
	examples/j2ee/src/META-INF/sun-ejb-jar.xml: New files.
	
	* examples/languages/scheme-demo.php, examples/languages/README: New
	files.

	* scheme-demo.php: Removed, now in examples.

	* tests.php5/bench.php, tests.php5/excel_antitest.php,
	tests.php5/ExcelTest.java, tests.php5/exceltest.jar: Removed, now
	in examples.
	
2005-01-25  Jost Boekemeier  <jostb@intern>

	* bind.c (java_get_server_args): Append library path.
	
	* client.c, java_bridge.c (ZEND_DECLARE_MODULE_GLOBALS): Removed.
	(ZEND_EXTERN_MODULE_GLOBALS): Added.

	* client.c (check_error): Removed.
	(java_connect_to_server): Do not call check_error, assume out of
	memory when the server cannot return global refs.
	
	* config.m4: Removed obsolete checks.

	* server/autogen.sh: Removed.
	
	* server/configure.gnu.in: New file, from autogen.sh.
	
	* config.m4: Create server/configure.gnu from configure.gnu.in

	* php-java-bridge: Only change LD_LIBRARY_PATH and PATH if the
	script is installed in one of the standard directories.  Invoke
	RunJavaBridge which is tagged with the SEL security context.

2005-01-24  Jost Boekemeier  <jostb@intern>

	* php-java-bridge.te, php-java-bridge.fc, RunJavaBridge.c.in: New
	files for Security Enhanced Linux.

	* server/Makefile_unix.am: Create RunJavaBridge.
	
	* Makefile.frag (install_policy): New target to install the
	SELinux policy files.

	* php-java-bridge.spec: Install SELinux policy files.

	* README: Update from index.html

	* README.GNU_JAVA: New file.

	* README: Note about UTF-8 added.

	* server/acinclude.m4: No longer include tests from PHP

	* server/JavaBridge.java (run, handleRequests): Pass down Hash.
	server/natcJavaBridge.c
	(connection_startup): Obsolete.

	* server/natcJavaBridge.c: Avoid calling JNI when logLevel is too
	low.
	(getObjectHash): New function.
	(handleRequest): Use getObjectHash() in order to avoid allocating
	a hash too often.

2005-01-07  Jost Boekemeier  <jostb@intern>

	* server/JavaBridge.java
	(CreateObject, Invoke, GetSetProp): The server must survive a out
	of memory conditions. Check for OutOfMemoryError and abort the
	client-connection immediately, release all memory the client has
	allocated without client-notification.

	* server/natcJavaBridge.c
	(Java_JavaBridge_handleRequest): Release object hash after
	OutOfMemoryError.
	
2005-01-05  Jost Boekemeier  <jostb@intern>

	* server/JavaBridge.java
	(setException): Store method name, object, and arguments, print
	original cause.
	(Invoke, GetSetProp, CreateObject): Pass name, object and
	arguments.

	* server/JavaBridge.java (argsToString): Check if args is null.

	* server/JavaBridge.java (GetSetProp): Invocation or field access
	may fail if object is class and getter/setter/field is not static.
	Throw a NoSuchFieldException if no getter/setter or field was
	found.

	* php-java-bridge: Do not destroy LANG, which is needed by the VM
	to select the default file.encoding (usually UTF-8).  If LANG is
	not set, use en_US.UTF-8 as default.
	
2005-01-04  Jost Boekemeier  <jostb@intern>

	* server/JavaBridge.java: Changed indent.
	
	* server/JavaBridge.java (getResource, findResource): New methods
	needed to load resources from the private classloader.
	
2005-01-02  Jost Boekemeier  <jostb@intern>

	* server/configure.in, config.m4: follow symlinks to find the
	include directories.
	
	* README: Updated documentation from index.html
	
	* php_java.h: Use php_config.h.

	* tests.m4/function_checks.m4: Removed checks already provided by
	php/php_config.h
	
	* init_cfg.c.in, bind.c, client.c, java.c, java_bridge.c,
	php_java.h: cfg is now a true global.
	
	* bind.c (java_start_server): Check server, start, wait.
	(java_wait_server): New function
	(java_test_server): New function
	
	* php_java.h (java_start_server, java_test_server): New functions.

	* client.c (java_do_test_server, java_test_server): Removed.

	* java.c (init_server): Removed.
	(PHP_MINIT_FUNCTION): Call java_start_server instead of
	init_server.

	* init_cfg.c.in (init_socket): Generate a unique socketname in the
	Linux abstract namespace.
	
	* server/configure.in: AC_CONFIG_AUX_DIR before AM_INIT_AUTOMAKE,
	required by automake 1.8

	* tests.m4/threads.m4, tests.m4/function_checks.m4: Avoid
	"underquoted" warnings.
	
2004-12-19  Jost Boekemeier  <jostb@intern>

	* client.c, bind.c, server/natcJavaBridge.c, server/JavaBridge.java, server/acinclude.m4, server/configure.in, config.m4, java.c: 
	Support credentials on Linux, only.

	* client.c (java_connect_to_server): Connect if not already
	connected. Replaces all old init checks.
	
	* java.c (PHP_RINIT_FUNCTION): Don't connect until a java method
	is called.
	
	* client.c, bind.c, java.c: Use java_connect_to_server.

	* init_cfg.c.in (init_socket): Fixed typo.

	* php-java-bridge: Require sh instead of bash. Create PID in /tmp
	if /var/run does not exist.

	* README: Require GNU make.

	* README: Removed documentation about secure mode. Privilege
	dropping cannot be supported in java. Users should use java
	security instead.  In the future we'll use our bridge JVM as a
	relay to access beans deployed in WebSphere, WebLogic or 9iAS and
	these AS have their own policy anyway.

	* server/configure.in: Use links instead of modifying the include
	path. Require versions for automake and autoconf.

	* server/JavaBridge.java (now): New function to workaround a bug
	in GNU java (calendar not available).

	* server/JavaBridge.java (println): New function.

	* server/JavaBridge.java (select): enum is a keyword since 1.5
	
	
2004-12-12  Jost Boekemeier  <jostb@intern>

	* tests.m4/java_check_abstract_namespace.m4,
	tests.m4/java_check_struct_ucred.m4: New tests.
	
	* client.c, bind.c, server/natcJavaBridge.c, server/JavaBridge.java, server/acinclude.m4, server/configure.in, config.m4, java.c: 
	Use abstract namespace and struct ucred, if available.  This means
	that a) the communication channel is no longer visible and b) that
	only authorised users can connect to the server (checked by the
	kernel). 

	* server/JavaBridge.java (println): New procedure.
	(HandleRequests): Log the user ID and the group ID of the user
	that connects to the PHP/Java Bridge.  

	* tests.m4/function_checks.m4: Check for AF_LOCAL and PF_LOCAL.
	
	
2004-12-05  Jost Boekemeier  <jostb@intern>

	* php-java-bridge 1.0.7 released
	

2004-12-04  Jost Boekemeier  <jostb@intern>

	* java.c (function_entry): Set the arginfo for __call, __get, __set.

	* php5-crash-in-evaluator-shutdown_workaround.patch: New file.

2004-12-03  Jost Boekemeier  <jostb@intern>

	* server/natcJavaBridge.c (Java_JavaBridge_startNative): Do not
	catch SIGPWR, which is used by the Boehm GC.
	(post): Next kill should kill.

	* bind.c (wait_for_daemon): kill three times, if necessary.

	* client. (handle_request): Do not discard retval for PHP 4.

2004-12-01  Jost Boekemeier  <jostb@intern>

	* php_wrapper.h: New file 

	* java.c, bind.c, client.c, java.c, java_bridge.c, java_bridge.h,
	php_java.h, proxyenv.c: Do not use php.h directly but include
	php_wrapper.h to avoid problems with NDEBUG.

	* README: Replaced NDEBUG with JAVA_COMPILE_DEBUG

	* proxyenv.c, protocol.h
	(CallObjectMethod, CallVoidMethod, NewObject): Functions removed.
	(CallObjectMethodA, CallVoidMethodA, NewObjectA): New functions.
	
	* java.c, client.c, java.c, java_bridge.c: Use new functions in
	order to avoid varargs problems.

	* client.c (setResultFromException, setResultFromObject): Fix
	memory leak.

	* client.c (setException): correctly set the result, then throw
	and exception.

	* client.c (java_connect_to_server), java.c
	(PHP_RSHUTDOWN_FUNCTION): Global ref for the reflect_class.

	* php_java.h, java.c (php_java_class_class_entry): New global.
	
	* java.c (java__destruct): Issue a warning if PHP 5 calls the
	destructor after the module doesn't exist anymore.  -- PHP 5 first
	unmaps the module and then shuts down the evaluator which in turn
	calls the destructors for the objects it manages.  This is a bug
	because the classes and their handlers do not exist anymore.  If
	the module was loaded via dl(), PHP 5 will crash in shutdown.
	(java_instanceof): check for object class or class class.
	
	* java.c (create_object): Use ALLOC_HASHTABLE instead of
	ALLOC_HASHTABLE_REL.
	(iterator_current_key): PHP 5 wants the string length +1.

	* java_bridge.c (php_java_getset_property): Remove transaction
	(php_java_get_property_handler): Protect by transaction.
	(php_java_getset_property): Protect by transaction.

	* php-java-bridge.service: Changed description.

	* protocol.h (LOGFILE): New constant

	* server/natcJavaBridge.c, server/JavaBridge.java (trampoline):
	Return if communication is broken.
	(openLog): New function.

	* server/JavaBridge.java (coerce): Better error reporting.
	(argsToString): New function.
	(select): Identify component type.

	* tests.php/ArrayToString, tests.php5/ExcelTest.java,
	tests.php5/arrayToString.php, tests.php5/arrayToString.jar,
	tests.php5/bench.php, tests.php5/excel_antitest.php: New files.
	
2004-11-28  Jost Boekemeier  <jostb@intern>

	* test.php: use <br>
	
	* php-java-bridge.spec: test.php added
	
	* java_bridge.c (java_get_jobject_from_object): new function.
	
	* server/JavaBridge.java (handleRequest, HandleRequest,
	trampoline, Trampoline): New methods.
	(getPhpMap): Cast null to (Object)null in order to appease gnu
	java. Pass value, not this.
	(printStackTrace): Print trace if fatal or level >=2

	* client.c (java_instanceof): rewritten.
	(java__destruct): new function.


	Until now local variables were not deallocated until script
	termination.  A long running php script could provoke out of
	memory conditions on the server side. In order to allow long
	running scripts and in order to make client side programming
	easier and more robust, the server now maintains both, global
	_and_ local refs.  The JNI DeleteLocalRef should not be used
	anymore. To protect variables from beeing garbage collected, the
	new protocol requests BEGIN/END_TRANSACTION(env) must be used.  If
	the client does not call END_TRANSACTION, the server will
	automatically terminate all transactions at the end of the
	script. If the client does not call BEGIN_TRANSACTION and calls a
	method that creates and returns a new object, the object will be
	reclaimed immediately after the client has received it
	(i.e. the received object becomes invalid). Server replies
	(protocol #101..110) are an exception; the values they return
	remain valid until client acknowledges the reply (as usual).
	
	* protocol.h, proxyenv.c (DELETELOCALREF, DeleteLocalRef): Removed
	(BEGIN_TRANSACTION, END_TRANSACTION): New macros
	(TRANSACTION_BEGIN, TRANSACTION_END): New constants

	* server/natcJavaBridge.c (trampoline, handleRequest): New globals.
	(DELETEGLOBALREF): Removed.
	(TRANSACTION_BEGIN, TRANSACTION_END): New protocol requests.
	(handle_request_impl): Removed. (replaced by handleRequest)
	(handleRequest): New function
	(trampoline): New function
	(handleRequests): Rewritten (code moved to trampoline)
	(javabridge): Define handleRequest and trampoline
	
	* client.c (java_connect_to_server, java_set_library_path,
	java_instanceof, offsetExists, offsetGet, offsetSet, offsetUnset,
	cast, iterator_move_forward, get_iterator,
	php_java_call_function_handler, php_java_makeObject,
	php_java_getset_property): Use TRANSACTION_BEGIN/END instead of
	DeleteLocalRef. Use java_get_jobject_from_object.
	
	
2004-11-26  Jost Boekemeier  <jostb@intern>

	* php-java-bridge: use sh to start the sub-process so that only
	one "php-java-bridge" process appears in the process list.

	* java.c, php_java.h (php_java_handlers, create_object, cast): New
	functions/globals for PHP 5.
	* tests.php5/toString.php: New test

	* server/JavaBridge.java (getPhpMap): correct documentation.

	* server/natcJava.c, server/JavaBridge.java, client.c
	(nextElement, hashUpdate, hashIndexUpdate, setResultFromArray):
	Replaced by the new PHP 5 iterator and array interfaces. -- These
	functions should have never been written, they copied entire
	arrays or hash tables from java to PHP.  But we have to keep them
	for PHP 4 for backward compatibility with ext/java.  They even
	caused trouble in the past, see change log entries from 2004-09-09
	and 2004-09-19, where we had to correct a problem interited from
	the original PHP 4 ext/java extension.
	
2004-11-24  Jost Boekemeier  <jostb@timon.intern>

	* instanceof.php, iteratorInterface.php, arrayInterface.php,
	array.php, Array.java, array.jar: new files in tests.php5
	
	* client.c (handle_request): Do not discard null results for PHP 5

	
	PHP 5 Iterator interface:
	
	* php_java.h (clearEx, lastEx, setJarPath, getPhpMap, invoke, gsp,
	co, hasMore, getType, moveForward): New globals.
	
	* client.c (java_connect_to_server): Init globals
	
	* java_bridge.c, java_bridge.h (php_java_invoke): New function.
	
	* java_bridge.c (php_java_call_function_handler): Use globals
	
	* java.c (java_iterator, iterator_dtor, iterator_valid,
	iterator_current_key, init_current_data, iterator_move_forward,
	java_iterator_funcs, get_iterator): New functions/structures.
	(PHP_MINIT_FUNCTION): Rewritten.
	
	* server/JavaBridge.java (PhpMap): New abstract class.
	(getPhpMap): Factory.
	
	* protocol.h, proxyenv.c, server/handleRequest.c (IsInstanceOf):
	New protocol request.
	
	* php-java-bridge.spec, server/MakefileUnix.am: Fiddle with the
	new generated JavaBridge$$foo1,2,3xyz output classes. Fortunately
	they don't have slashes or backslashes in their names ...

	
	PHP 5 array interface:
	
	* java.c (offsetExists, offsetGet, offsetSet, offsetUnset,
	arginfo_array_offsetSet, arginfo_array_offsetGet): New
	functions/structures for PHP 5.
	(PHP_MINIT_FUNCTION): Rewritten.
	
	
	* server/natcJavaBridge.c (handle_request): Fixed typo.
	
2004-11-21  Jost Boekemeier  <jostb@intern>

	* README, server/natcJavaBridge.c, server/JavaBridge.java,
	INSTALL, client.c, java_bridge.c, java_bridge.h, java_bridge,
	protocol.h, proxyenv.c, java.c: New "java_class" constructor.
	
2004-11-20  Jost Boekemeier  <jostb@intern>

	* server/JavaBridge.c (findClass): Use String.valueOf instead of
	.toString so that we get the proper ClassNotFoundException instead
	of a null pointer exception.
	
2004-11-18  Jost Boekemeier  <jostb@intern>

	* README: Removed sections about Sun's JSR 223 and outdated notes
	from Sam Ruby.

	* VERSION, php-java-bridge.spec: Version

	True try/catch handling.
	* client.c, server/natcJavaBridge.c, server/JavaBridge.java: Pass
	jthrowable to client.
	* client.c (setResultFromException): New method
	(setException): Call setResultFromException with the jthrowable object

	New class: java_exception
	* java.c, php_java.h (php_java_exception_class_entry): New variable
	* java.c (PHP_MINIT_FUNCTION): New class
	
	Display java objects
	* java.c (java_class_functions): New entry
	(java__tostring): New function

	* java_bridge.c (checkError): Disable for PHP5

	* tests.php5/exception.php: Rewritten

	* tests.php5/printStackTrace.php: New file
	
2004-11-16  Jost Boekemeier  <jostb@intern>
	
	PHP 5 supported
	* java_bridge.h, java_bridge.c (php_java_call_function_handler,
	php_java_set_property_handler, php_java_get_property_handler),
	php_java.h (php_java_class_entry): rewritten to use PHP 5 style
	* java.c (javajava, java__call, java__set, java__get, make_lambda): New functions (PHP 5)
	(call_function_handler, get_property_handler, set_property_handler): New functions (PHP 4)
	(java_class_functions): New structure
	(PHP_MINIT_FUNCION): rewritten
	(PHP_MSHUTDOWN_FUNCTION): rewritten

	* java_bridge.c (wait_for_daemon, php_java_shutdown_library): removed
	* bind.c (wait_for_daemon, php_java_shutdown_library): new from java_bridge.c
	* client.c (swrite, sread, id): removed
	* proxyenv.c (java_swrite, java_sread, java_id): new from client.c

	* client.c (CFG_JAVA_SOCKET_INET): Fixed typo

	The PHP 5 object system revealed a bug in the core protocol: If
	someone managed to send a PHP array with an PHP OBJ type in it, the
	client stopped working immediately.
	* server/natcJavaBridge.c (handle_request NEWOBJECT): Accept a count
	(short), not a length (size_t).
	
	
2004-11-11  Boekemeier  <jost2345@intern>

	* server/natcJavaBridge.c, sio.c, sio.h, protocol.h, java.c, init_cfg.c.in, client.c: 
	Disable threads and use TCP sockets on windows.
	
2004-11-03  Boekemeier  <jost2345@intern>

	* init_cfg.c.in (java_destroy_cfg): Free the memory _we_ have
	allocated, not the memory that apache has allocated. Otherwise
	apache 2.0 will loop in malloc_consolidate.
	* java.c (PHP_MSHUTDOWN_FUNCTION): Code re-enabled.

	* server/JavaBridge.java (init): Log the log file name only if
	level >= logdebug

2004-11-02  Jost Boekemeier  <jostb@intern>

	* java.c (PHP_MSHUTDOWN_FUNCTION): Reverted last change (code
	disabled). This caused a loop in malloc_consolidate in apache 2.0.
	
	* php-java-bridge 1.0.6a released
	
	
2004-10-31  Jost Boekemeier  <jostb@intern>

	* bind.c (java_start_server): Protect guard; a dead guard isn't
	really useful.
	
	* server/natcJavaBridge.c 
	(Java_JavaBridge_startNative): Removed debug code.
	(Java_JavaBridge_handleRequests): Cleanup.

	* php-java-bridge 1.0.6 released.

2004-10-30  Boekemeier  <jost2345@intern>

	* server/natJavaBridge.c (java_bridge_main_gcj): Correct typo.
	
	* server/natcJavaBridge.java (readChunks, read): New functions
	(load): Use these to work around a bug in GNU java

	* server/java.c (usage): New function

2004-10-28  Boekemeier  <jost2345@intern>

	* README: Document java.log_level
	
	* server/natcJavaBridge.java: log jars as info, not debug.

	* server/Makefile.am: Removed
	* server/Makefile.in: New file

	* server/java.c: Print usage().
	
2004-10-26  Boekemeier  <jost2345@intern>

	Split the unix and windows functionality into two makefiles to
	work around a problem in autoconf
	* server/Makefile_unix.am, server/Makefile_windows.am: New files
	* server/Makefile.am: Rewritten
	* server/autogen.sh: return value from autoconf

2004-10-24  Jost Boekemeier  <jostb@diego.intern>

	* README: Document java_set_library_path
	* java.c, scheme_demo.php: Renamed java_set_jar_library_path to java_set_library_path
	
	* server/JavaBridge.java, server/natcJavaBridge.c, server/configure.in: Load libraries from /usr/share/java or from ext_dir/lib

	* ChangeLog: Changed order, latest at top

	* config.m4: Do not build DLLs for win98

	* server/acinclude.m4: rewritten.

	* server/configure.in: AC_PROG_LIBTOOL should recognize
	AM_PROG_GCJ
	
2004-10-23  Jost Boekemeier  <jostb@diego.intern>

	Added support for Solaris 64 and Solaris broken stdio.
	* protocol.h, proxyenv.c, client.c, natcJavaBridge.c: Use SFREAD ... instead of fread.
	* sio.c, sio.h: New files
	* tests.m4/function_checks.m4, tests.m4/java_check_broken_gcc_installation.m4, tests.m4/java_check_broken_stdio_buffering.m4, tets.m4/threads.m4: New files

	* LICENSE: Correct author.

	Correct classpath problem
	* natcJavaBridge.c, client.c: Client receives the bridge instance as first element.
	* JavaBridge.java: Start a new thread, set the context classloader on java level.
	* natcJavaBridge.c: Do not call attachCurrentThread, which is broken in gcj.

	Added support for static binaries.
	* natcJavaBridge.c, bind.c: Invoke jniRegisterNatives.

	Use GNU autoconf to configure the server part separately. Share the
	test macros from PHP and the java module with the server part.
	* Makefile.frag: rewritten
	* server/acinclude.m4, server/autogen.sh, server/configure.in: new files
	* config.m4: Include all tests in tests.m4.

	Win98 support.
	* sio.h: Do not depend on HAVE_CONFIG_H
	* natcJavaBridge: Win98 does not support sigwait

	* function_checks.m4 (lsocket): test rewritten

	* README: Solaris, 64 bit VM's and Win98 are supported
	
2004-09-27  Jost Boekemeier  <jost2345@mail.yahoo.de>

	* JavaBridge.java (findClass): Store the classes into a weak-value 
	hash so that classes don't get loaded multiple times (some JVM's
	don't have a class GC).

	* natcJavaBridge (handle_request, connection_cleanup): Count
	the # of handles the client has aquired.

	* java_bridge.c (wait_for_daemon): gcj uses the 2 internaly(!), we
	must send it twice to kill it. 
	
2004-09-26  Jost Boekemeier  <jost2345@mail.yahoo.de>

	* natcJavaBridge.c (Java_JavaBridge_startNative): do not restart
	when signal arrived, this caused problems on some OS.

	It is now possible to set the library path at run-time e.g.:
	java_set_jar_library_path(";file:c:/test.jar;http://foo.com/xy.jar");
	* Javabridge.java (setJarLibraryPath, load, findClass): New methods.
	(CreateObject): Load classes via our own classloader.
	* java.c (java_set_jar_library_path): New function.
	* client.c (java_connect_to_server): Call constructor.
	* sample.php: Use new function.

	* java.c (java_last_exception_clear, java_last_exception_get):
	Check if java is initialized.

	* client.c (abort_on_error): Renamed to check_error.

	* client.c (java_do_test_server): Check return value from close().

	* php-java-bridge 1.0.5 released.

2004-09-23  Jost Boekemeier  <jost2345@mail.yahoo.de>

	Use a guard thread instead of a async signal to shutdown the server.
	* natcJavaBridge.c (mutex, cond, count, block): New variables.
	(exit_sig): removed
	(block_sig, enter, leave, guard_requests): New functions.
	(initGlobals): initialization added
	(handle_requests): update thread count
	(Java_JavaBridge_startNative): terminate after guard has terminated.
	* README: Note about dynamic loading via dl() added.
		
        The bridge must do its own resource tracking because php4 calls 
	the php_java_destructor too late (*after* rshutdown!).
	* java_bridge.c (php_java_destructor): Code disabled.
	* natcJavaBridge.c (enumClass, hashKeys, enumMore, enumNext): New
	globals.
	(initGlobals): initialization
	(connection_startup, connection_cleanup): New functions.
	(handle_requests, handle_request_impl, handle_request): Trace global
	refs.
	
2004-09-21  Jost Boekemeier  <jost2345@mail.yahoo.de>

        * java.c (PHP_MINIT_FUNCTION): Fixed a typo that caused a massive
	memory leak on the java side of the bridge.  The DeleteGlobalRef
	was never called and since Java does not release the memory when
	a client detaches from the VM (thanks, Sun!) the memory remained
	locked until the VM ran out of memory.

	* natcJavaBridge.c (Java_JavaBridge_startNative): Linux handles
	accept different than the BSD variants.  Check errno.

	Starting java as a daemon should solve the sub-process problem.
	* bind.c (java_start_server): Start java as a daemon, if possible.
	(readpid): New function.
	* java_bridge.c (php_java_shutdown_library): Wait for daemon
	(wait_for_daemon): New function
	* README: Delete the note about Apache 1.3.
	
	Correctly shut down the connection in rshutdown
	* java.c (PHP_RSHUTDOWN_FUNCTION): Delete global refs and close
	file descriptors.
	
2004-09-19  Jost Boekemeier  <jostb@diego.intern>

        Allocate pval's correctly, part II -- the previous change for 1.0.2
	was incorrect: the php interpreter could not work reliable anymore if nextElement,
	hashIndexUpdate or hashUpdate was called.
	* client.c (nextElement, hashIndexUpdate, hashUpdate): Increment the refcount.

	* php-java-bridge.spec, php-java-bridge.service, php-java-bridge:
	New file.

	* php.ini: Removed (now in php-java-bridge.spec).

	* INSTALL, LICENSE: New file.
	
	Starting the JVM from the web-server caused several problems.  
	Apache 1.3 even killed the server-part of the bridge.
	* README: Recommend to start the JVM separately and to hardcode the 
	java.socketname.
	* bind.c (java_start_server): Do not start the server part of the
	bridge if the user has hardcoded the java.socketname in java.ini.
	(can_fork): New function.

	* natcJavaBridge.c (handle_request): If the JVM ran out of memory
	do nothing, send back null-pointer.
	(exit_sig): Workaround for a bug in the IBM JVM. This VM should
	not hang anymore when started as a sub-process from Apache --
	starting the VM as a sub-process of Apache is now deprecated
	anyway.

	* php-java-bridge 1.0.4 released.
	

2004-09-15  Jost Boekemeier  <jost2345@mail.yahoo.de>

	* JavaBridge.java: The bridge now catches errors and runtime
	exceptions such as "class not found" and reports them to the
	client.

2004-09-12  Jost Boekemeier  <jost2345@mail.yahoo.de>

	* README: GNU Java supported

	The SUN Java implementation may store objects on the stack.
	Objects on the heap may reference them. So in this JVM we cannot
	simply longjmp to clear the stack, because some heap objects may
	still refer to dead locations.  The result would be that the VM
	will barf when the GC tries to follow these phantom references.
	* natcJavaBridge.c: Longjmp to the last savepoint, then return
	back to java, throw an exception to return to one of the three
	native main methods and then jump back to the loop.  This fixes a
	crash in the SUN VM which occured after apache has aborted the
	connection.

	* php-java-bridge 1.0.3 released.
	
2004-09-10  Jost Boekemeier  <jost2345@mail.yahoo.de>

	* java.c: Display empty string as ''.

	REL3 or RH9 running a non-NPTL kernel require to set the
	environment variable LD_ASSUME_KERNEL=2.4.19 in order to run
	jdk1.4 correctly.
	* bind.c: Pass modified environment on to the child process.

2004-09-09  Jost Boekemeier  <jost2345@mail.yahoo.de>
	
	Initialize PVAL's so that they have a proper ref-count.  Otherwise 
	either the bridge or the JVM might crash (or both).
	* java.c: Allocate pval's correctly.

	* php-java-bridge 1.0.2 released.

2004-08-30  Jost Boekemeier  <jost2345@mail.yahoo.de>

	* bind.c: wait until the JVM is initialized

	Initialize the cfg vars correctly so that only one VM is started
	* java.c, init_cfg: set the defaults _after_ the cfg changes.

	* php-java-bridge 1.0.1 released.
	
2004-08-29  Jost Boekemeier  <jost2345@mail.yahoo.de>

	* php-java-bridge 1.0.0 released.
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.