phpBeans

Bean statefulness

Forum / Server Programming / Bean statefulness

Reply         Subscribe         Start new thread         Syndicated Feed (RSS)        

Displaying 1 to 3 of 3 Previous   1   Next
Author Message
rgonzale

Posts: 2
Bean statefulness - Posted: February 7, 2005 - 11:42 AM Quote and reply
Hi,

is there any way that I could make a bean independent from each client connected to the server?
I hope someone can understand my english...

Best regards,

Rodrigo.

Back to top
lux

Posts: 17
Re: Bean statefulness - Posted: February 9, 2005 - 10:49 AM Quote and reply
rgonzale said:
Hi,

is there any way that I could make a bean independent from each client connected to the server?
I hope someone can understand my english...

Best regards,

Rodrigo.


Hi Rodrigo,

I'm afraid objects in phpBeans are shared across all client connections. One potential way around this, although it would cause other side effects (described below), would be to change the following line in the file server.php:

$server =& Net_Server::create ('sequential', $conf['Server']['hostname']...

To this:

$server =& Net_Server::create ('fork', $conf['Server']['hostname']...

The negative effects would be that you can no longer remotely administer the server. For example, a call to 'user/add' would add the user to the list in your object space, but not for other connections. It would also save it to disk, so the change would take effect if you restarted the server (sort of like Apache's httpd.conf, where every change requires a restart of the server, but without the possibility of MySQL's 'flush privileges').

Hope this helps.

Cheers,

Lux

Back to top
rgonzale

Posts: 2
Re: Bean statefulness - Posted: February 9, 2005 - 12:57 PM Quote and reply
Thanks,
this is just what I need right now

Regards,

Rodrigo.


Hi Rodrigo,

I'm afraid objects in phpBeans are shared across all client connections. One potential way around this, although it would cause other side effects (described below), would be to change the following line in the file server.php:

$server =& Net_Server::create ('sequential', $conf['Server']['hostname']...

To this:

$server =& Net_Server::create ('fork', $conf['Server']['hostname']...

The negative effects would be that you can no longer remotely administer the server. For example, a call to 'user/add' would add the user to the list in your object space, but not for other connections. It would also save it to disk, so the change would take effect if you restarted the server (sort of like Apache's httpd.conf, where every change requires a restart of the server, but without the possibility of MySQL's 'flush privileges').

Hope this helps.

Cheers,

Lux




Back to top

Return to Top


  Powered by Sitellite Enterprise PHP CMS