From: Abbett, J. <Jon...@ch...> - 2005-09-06 15:20:06
|
I get a null pointer exception whenever I try to "put" a session variable with a null value. Is this expected behavior? How should one remove a single variable from the session store? With that in mind, a full explanation of how to use the bridge's Java session store is in order. The code snippet on the website only scratches the surface. What are all the available methods? So far, I've encountered isNew(), put(), get(), destroy(), and setTimeout(). In general, the bridge's documentation could use a lot of work. I'd be willing to help flesh it out and make it more formal, though I don't have a lot of experience documenting open source software. Perhaps using a wiki would help, so it could be more of a collaborative effort? --Jon =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Jonathan Abbett Children's Hospital Informatics Program 1 Autumn Street, Fifth Floor Boston, MA 02215 617-355-8334 jon...@ch... http://www.chip.org |
From: Ben G. <be...@ja...> - 2005-09-06 16:24:08
Attachments:
signature.asc
|
Abbett, Jonathan wrote: > I get a null pointer exception whenever I try to "put" a session > variable with a null value. Is this expected behavior? How should one > remove a single variable from the session store? If you look at the code in server/php/java/bridge/Session.java, you'll see that put() expects two objects, so putting "null" will always throw that exception. $session->remove("key") will remove a variable. > With that in mind, a full explanation of how to use the bridge's Java > session store is in order. The code snippet on the website only > scratches the surface. What are all the available methods? So far, > I've encountered isNew(), put(), get(), destroy(), and setTimeout(). > > In general, the bridge's documentation could use a lot of work. I'd be > willing to help flesh it out and make it more formal, though I don't > have a lot of experience documenting open source software. Perhaps > using a wiki would help, so it could be more of a collaborative effort? I'd be happy to contribute to a documentation wiki. I even have some server space to set one up, if need be. The bridge works great, but documentation is definitely on the "Use the source, Luke" side :) Cheers, -- Ben |
From: Jost B. <jos...@ya...> - 2005-09-06 16:44:49
|
Hi Ben, > I'd be happy to contribute to a documentation wiki. > I even have some > server space to set one up, if need be. that would be great. I'd prefer to keep that separate, probably outside of sf.net. Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Ben G. <be...@ja...> - 2005-09-07 19:03:56
Attachments:
signature.asc
|
Jost Boekemeier wrote: > Hi Ben, > > >>I'd be happy to contribute to a documentation wiki. >>I even have some >>server space to set one up, if need be. > > > that would be great. I'd prefer to keep that separate, > probably outside of sf.net. > Cool. I'll get MediaWiki set up - cycles are a bit short right now, but I should have something next week. Any suggestions on a domain name? Is there anything in particular folks would like to see besides the documentation? I think it'd be nice to have a FAQ and a How-To section with some nice sample code (adding Lucene searches to PHP apps is especially cool). Cheers, -- Ben |
From: Jost B. <jos...@ya...> - 2005-09-06 16:30:46
|
Hi Jonathan, > I get a null pointer exception whenever I try to > "put" a session > variable with a null value. Thank you very much for the bug report. The non-j2ee Session (please see http://cvs.sourceforge.net/viewcvs.py/php-java-bridge/php-java-bridge/server/php/java/bridge/Session.java?rev=1.10&view=markup) is currently backed by a Hashtable. That must be a HashMap, of course[1]. If you have the JavaBridge backend running in eclipse, please change the line protected Hashtable map; to protected HashMap map; I will fix this bug for the official 2.0.8 release. -> PR1283148 (https://sourceforge.net/tracker/index.php?func=detail&aid=1283148&group_id=117793&atid=679233) > behavior? How should one > remove a single variable from the session store? Please use $session->remove($var). Please see http://cvs.sourceforge.net/viewcvs.py/php-java-bridge/php-java-bridge/server/php/java/bridge/ISession.java?view=markup > With that in mind, a full explanation of how to use > the bridge's Java > session store is in order. The java_get_session() invokes JavaBridge.getSession() which returns an ISession (see above). The actual implementation is either the servlet's HttpSessionFacade or our own Session.java, when the backend runs outside of a standard j2ee environment. > scratches the surface. What are all the available > methods? Please see the interface ISession.java above. -> PR1283154 (https://sourceforge.net/tracker/index.php?func=detail&aid=1283154&group_id=117793&atid=679233) > In general, the bridge's documentation could use a > lot of work. I'd be > willing to help flesh it out That would be great. If you want to document the 10 ISession methods, we can give you CVS write account. > Perhaps > using a wiki would help, so it could be more of a > collaborative effort? That's also a good idea. But then we need someone to maintain it. -> PR1283159 (https://sourceforge.net/tracker/index.php?func=detail&aid=1283159&group_id=117793&atid=679233) Regards, Jost Boekemeier [1] When we change from Hashtable to Hashmap, we must do the synchronization ourselfs. I guess that was the reason why I've used a Hashtable... ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |