[Resin-interest] Special virtual hosts

2006-09-13 Thread Jacky








Dear all,

 

I have a vhost like this that doesn’t seem to work, is
it bcos of the domain name?

In case you’re wondering, I’m dealing with
Chinese Domain Name.

 



  RewriteEngine on

  RewriteCond %{SERVER_PORT}   ^80$

  RewriteCond %{HTTP_HOST}   ^xn--eqrt2guv0afw3b\.hk$

  RewriteRule ^/(.*)
http://www.xn--eqrt2guv0afw3b.hk/$1 [L,R]

  DocumentRoot /www/apps

  ServerName xn--eqrt2guv0afw3b.hk

  ServerAlias www.xn--eqrt2guv0afw3b.hk

  DirectoryIndex default.jsp

  ResinConfigServer 192.168.1.101 6802

  ResinConfigServer 192.168.1.102 6802

  CauchoStatus yes

 

  # do not remove, otherwise apache will serve the jsp
source code once resin is down

  AddHandler caucho-request .jsp



 

Please reply if you need further info.

Thank you.

 

Warm Regards,

Jacky Wong

 






___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Configuring auto restart

2006-09-13 Thread Jacky








Thanks Kai, Bill, and Rob.

 

The configuration works great.

 



Warm Regards,

Jacky Wong











From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rob Lockstone
Sent: Friday, September 08, 2006
11:19 PM
To: Resin-Interest
Subject: Re: [Resin-interest]
Configuring auto restart



 

Bill is correct. And remember, if you still want Resin to notice when
jsp files have changed while keeping Resin from noticing when jar files or the
resin.conf file has changed, you can use the main dependency-check-interval tag
that Bill referenced, and a separate dependency-check-interval tag within the
 block under the  or
 sections, e.g.:



 











    true





    true





    300s











 





http://www.caucho.com/resin-3.0/config/webapp.xtp#jsp





 





Rob





 





On Sep 8, 2006, at 07:42 , Bill Au wrote:







You should be able to do
that by setting  to manual:

http://www.caucho.com/resin-3.0/config/resin.xtp#startup-mode

I think you will also need to set dependency-check-interval to either -1 or a
very large number
to disable resin restart triggered by modification to conf/resin.conf:

http://www.caucho.com/resin-3.0/config/env.xtp#dependency-check-interval

Bill



On 9/8/06, Jacky
<[EMAIL PROTECTED]> wrote:







Dear
all,



 



How
do I disable resin from auto-restarting every time I replace my jar files with
newer version or modifying my conf/resin.conf?



 



I
have tried to search for the documentation but to no avail.

Thank
you.



 



Warm
Regards,

Jacky
Wong



 










___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest





 



___





resin-interest mailing list





resin-interest@caucho.com





http://maillist.caucho.com/mailman/listinfo/resin-interest





 








___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Special virtual hosts

2006-09-18 Thread Jacky








Dear Scott,

 

You said that it was not tested with
Apache, but I have tried with just resin alone yet it still doesn’t work.

It will get the contents from
{RESIN_PATH}/webapps/ROOT/. Below is my sample vhost.

 

    

  

 


 


    

 

I browse to http://xn--eqrt2guv0afw3b.hk:8080
and it shows me resin default page.

Please share your knowledge with me if you
have the solution.

 

PS: I added xn--eqrt2guv0afw3b.hk to point
to our resin server in local environment using windows host file.

 

Thank you.

 



Warm Regards,

Jacky Wong











From: Scott Ferguson
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 19, 2006
12:07 AM
To: Jacky
Cc: Resin-Interest
Subject: Re: [Resin-interest]
Special virtual hosts



 

 





On Sep 13, 2006, at 5:01 AM, Jacky wrote:









Dear all,

 

I have a
vhost like this that doesn’t seem to work, is it bcos of the domain name?

In case
you’re wondering, I’m dealing with Chinese Domain Name.





 



I've added this as a bug report.  http://bugs.caucho.com/view.php?id=1350





 





Resin's support for the i18n names (the xn--) has been tested on Resin
itself, but we haven't checked with Apache, so there might be some kind of
mismatch.





 





-- Scott





 



 
RewriteEngine on

 
RewriteCond %{SERVER_PORT}   ^80$

 
RewriteCond %{HTTP_HOST}   ^xn--eqrt2guv0afw3b\.hk$

 
RewriteRule ^/(.*) http://www.xn--eqrt2guv0afw3b.hk/$1
[L,R]

 
DocumentRoot /www/apps

 
ServerName xn--eqrt2guv0afw3b.hk

 
ServerAlias www.xn--eqrt2guv0afw3b.hk

 
DirectoryIndex default.jsp

 
ResinConfigServer 192.168.1.101 6802

 
ResinConfigServer 192.168.1.102 6802

 
CauchoStatus yes

 

  # do
not remove, otherwise apache will serve the jsp source code once resin is down

 
AddHandler caucho-request .jsp



 

Please reply
if you need further info.

Thank you.

 

Warm Regards,

Jacky Wong

 





___





resin-interest mailing list





resin-interest@caucho.com





http://maillist.caucho.com/mailman/listinfo/resin-interest





 






___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Special virtual hosts

2006-09-19 Thread Jacky








FYI, I am using Resin pro 3.0.19 in
solaris 9.

 



Warm Regards,

Jacky Wong











From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jacky
Sent: Tuesday, September 19, 2006
2:47 PM
To: Resin-Interest
Subject: Re: [Resin-interest]
Special virtual hosts



 

Dear Scott,

 

You said that it was not tested with
Apache, but I have tried with just resin alone yet it still doesn’t work.

It will get the contents from {RESIN_PATH}/webapps/ROOT/.
Below is my sample vhost.

 

    

  

 


 


    

 

I browse to http://xn--eqrt2guv0afw3b.hk:8080
and it shows me resin default page.

Please share your knowledge with me if you
have the solution.

 

PS: I added xn--eqrt2guv0afw3b.hk to point
to our resin server in local environment using windows host file.

 

Thank you.

 



Warm Regards,

Jacky Wong











From: Scott Ferguson
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 19, 2006
12:07 AM
To: Jacky
Cc: Resin-Interest
Subject: Re: [Resin-interest]
Special virtual hosts



 

 





On Sep 13, 2006, at 5:01 AM, Jacky wrote:



 



Dear all,

 

I have a
vhost like this that doesn’t seem to work, is it bcos of the domain name?

In case
you’re wondering, I’m dealing with Chinese Domain Name.





 



I've added this as a bug report.  http://bugs.caucho.com/view.php?id=1350





 





Resin's support for the i18n names (the xn--) has been tested on Resin
itself, but we haven't checked with Apache, so there might be some kind of
mismatch.





 





-- Scott



 



 
RewriteEngine on

 
RewriteCond %{SERVER_PORT}   ^80$

 
RewriteCond %{HTTP_HOST}   ^xn--eqrt2guv0afw3b\.hk$

 
RewriteRule ^/(.*) http://www.xn--eqrt2guv0afw3b.hk/$1
[L,R]

 
DocumentRoot /www/apps

 
ServerName xn--eqrt2guv0afw3b.hk

 
ServerAlias www.xn--eqrt2guv0afw3b.hk

 
DirectoryIndex default.jsp

  ResinConfigServer
192.168.1.101 6802

 
ResinConfigServer 192.168.1.102 6802

 
CauchoStatus yes

 

  # do
not remove, otherwise apache will serve the jsp source code once resin is down

 
AddHandler caucho-request .jsp



 

Please reply
if you need further info.

Thank you.

 

Warm
Regards,

Jacky Wong

 





___





resin-interest mailing list





resin-interest@caucho.com





http://maillist.caucho.com/mailman/listinfo/resin-interest





 






___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Special virtual hosts

2006-09-20 Thread Jacky








Dear Scott,

 

I tried this:

    

  

 


 




 

Error:

java.io.CharConversionException:
conf/resin.conf:321: illegal utf8 encoding 0xcf

   
at com.caucho.xml.readers.Utf8Reader.error(Utf8Reader.java:161)

   
at com.caucho.xml.readers.Utf8Reader.readSecond(Utf8Reader.java:102)

   
at com.caucho.xml.readers.Utf8Reader.read(Utf8Reader.java:91)

   
at com.caucho.xml.readers.MacroReader.read(MacroReader.java:171)

   
at com.caucho.xml.XmlParser.parseValue(XmlParser.java:1232)

   
at com.caucho.xml.XmlParser.parseAttributes(XmlParser.java:731)

   
at com.caucho.xml.XmlParser.parseElement(XmlParser.java:605)

   
at com.caucho.xml.XmlParser.parseNode(XmlParser.java:366)

   
at com.caucho.xml.XmlParser.parseInt(XmlParser.java:241)

   
at com.caucho.xml.AbstractParser.parse(AbstractParser.java:633)

   
at com.caucho.relaxng.VerifierFilter.parse(VerifierFilter.java:83)

   
at com.caucho.config.Config.parseDocument(Config.java:375)

   
at com.caucho.config.Config.parseDocument(Config.java:328)

   
at com.caucho.config.Config.configure(Config.java:167)

   
at com.caucho.server.resin.Resin.init(Resin.java)

   
at com.caucho.server.resin.Resin.main(Resin.java:623)

 

And this:

    ="香港域名" root-directory="/www/myapp">

  

 


 




 

No error for this one, but the resin
server kept restarting itself.

 

I’m not sure if I am missing something
here.

Please advice.

Thank you.

 



Warm Regards,

Jacky Wong











From: Scott Ferguson
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 20,
2006 12:08 AM
To: Jacky
Cc: Resin-Interest
Subject: Re: [Resin-interest]
Special virtual hosts



 

 





On Sep 18, 2006, at 11:47 PM, Jacky wrote:









Dear Scott,

 

You said that it was not tested with Apache, but I have tried with
just resin alone yet it still doesn’t work.

It will get the contents from {RESIN_PATH}/webapps/ROOT/. Below is
my sample vhost.

 

    

  

  

  

    





 



Can you try changing the id value to the utf-8 encoding of the host
name?





 





Resin automatically converts the xn-- code to a unicode string and
matches that string against the  name.  It's not currently
possible for the  to have an xn-- name.





 





-- Scott





 

I browse to http://xn--eqrt2guv0afw3b.hk:8080
and it shows me resin default page.

Please share your knowledge with me if you have the solution.

 

PS: I added xn--eqrt2guv0afw3b.hk to point to our resin server in
local environment using windows host file.

 

Thank you.

 



Warm Regards,



Jacky Wong













From: Scott Ferguson [mailto:[EMAIL PROTECTED]]

Sent: Tuesday, September 19, 2006
12:07 AM
To: Jacky
Cc: Resin-Interest
Subject: Re: [Resin-interest]
Special virtual hosts



 

 





On Sep 13, 2006,
at 5:01 AM, Jacky wrote:












Dear all,

 

I have a
vhost like this that doesn’t seem to work, is it bcos of the domain name?

In case
you’re wondering, I’m dealing with Chinese Domain Name.





 



I've added this as
a bug report.  http://bugs.caucho.com/view.php?id=1350





 





Resin's support
for the i18n names (the xn--) has been tested on Resin itself, but we haven't
checked with Apache, so there might be some kind of mismatch.





 





-- Scott








 



 
RewriteEngine on

 
RewriteCond %{SERVER_PORT}   ^80$

 
RewriteCond %{HTTP_HOST}   ^xn--eqrt2guv0afw3b\.hk$

 
RewriteRule ^/(.*) http://www.xn--eqrt2guv0afw3b.hk/$1
[L,R]

 
DocumentRoot /www/apps

 
ServerName xn--eqrt2guv0afw3b.hk

 
ServerAlias www.xn--eqrt2guv0afw3b.hk

 
DirectoryIndex default.jsp

 
ResinConfigServer 192.168.1.101 6802

 
ResinConfigServer 192.168.1.102 6802

 
CauchoStatus yes

 

  # do
not remove, otherwise apache will serve the jsp source code once resin is down

 
AddHandler caucho-request .jsp



 

Please reply
if you need further info.

Thank you.

 

Warm Regards,

Jacky Wong

 





___





resin-interest
mailing list





resin-interest@caucho.com





http://maillist.caucho.com/mailman/listinfo/resin-interest





 





___





resin-interest mailing list





resin-interest@caucho.com





http://maillist.caucho.com/mailman/listinfo/resin-interest





 






___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] load balancing related questions

2006-10-19 Thread Jacky








Dear all,

 

We have successfully configure 2 resin servers (server a and
server b in separate machines, does not have an internet ip) running with
apache (exposed to the internet) load balancing module. Everything works fine.

 

Here is a snippet of the cluster configuration in resin.conf:

    

  120s

  

  

    

 

We start the servers using this command:

 

In machine a:

/www/resin/bin/httpd.sh –server a –conf /www/resin/conf/resin.conf
start

 

In machine b:

/www/resin/bin/httpd.sh –server b –conf /www/resin/conf/resin.conf
start

 

Here comes my problem:

 

I need to view the proxool’s admin servlet using a domain
name (eg. www.example.com). Due to the reason that we are using apache’s
load balancing, I am unable to determine which server that will be serving my
servlet. Therefore, i need a way that I can go directly to a machine and view
the proxool’s admin servlet of that web server.

 

My question:

 

How can I configure the cluster to listen to 6802(for apache
to use) and 8080(for me to use) at the same time when I run the startup command
so that I can go to http://www.something.com:8080/proxooladmin?

 

Please advice.

 

Warm Regards,

Jacky Wong






___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] resin load distribution

2006-11-05 Thread Jacky




Dear all,

In our environment, we are using 1 apache server and load balanced to 2
resin servers (a. 192.168.11.101 and b. 192.168.11.102).

A snippet of our apache httpd.conf:


  RewriteEngine on
  RewriteCond %{SERVER_PORT}   ^80$
  RewriteCond %{HTTP_HOST}   ^some\.domainname\.com$
  RewriteRule ^/(.*) https://some.domainname.com/$1
[L,R]
  DocumentRoot /www/app01
  ServerName svr01
  DirectoryIndex index.jsp
  ResinConfigServer 192.168.11.101 6802
  ResinConfigServer 192.168.11.102 6802
  CauchoStatus yes

  # do not remove, otherwise apache will serve the jsp source code once
resin is down
  AddHandler caucho-request .jsp


and our resin.conf:

    
  
  
    

How can i configure one server to serve more than the other?
Say for example, server a (70%) and server b (30%)?

Please advice.
Thanks.
-- 
Warm regards,
Jacky Wong





___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] resin load distribution

2006-11-07 Thread Jacky




Dear Scott,

Is there anyway that the "client-weight" can be used with Apache?
I'm using 3.0.29 professional.

I checked the caucho site and i the only thing i can find that is most
relevant to my needs is this:
http://www.caucho.com/resin-3.0/install/cse-apache.xtp#balance

but it does not allow me to configure the weight.

please advice.

Scott Ferguson wrote:

  On Nov 6, 2006, at 9:33 AM, Sam wrote:

  
  

  How can i configure one server to serve more than the other?
  

Since 3.0.20, there is a "client-weight" option for each srun. For  
eaxample, the following causes
server a to get used twice as much as server b:

  
  

For 3.1 and later, it is called "load-balance-weight":

  
  

  
  
True, but it's only available using Resin as a load balancer, not  
Apache/mod_caucho.

-- Scott

  
  
-- Sam



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

  
  

___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

  


-- 
Warm regards,
Jacky Wong




___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] Question on db based distributed session

2007-01-08 Thread Jacky




Dear all,

I have implemented resin's distributed session along with apache.
Apache is the entry point, which will use mod_caucho plugin to dispatch
requests to resin.
Now it is working fine and i'm happy about it. 

After a few test run on this, i found out something which i'm not sure
if its my implementation problem or bug.
I have server A and server B running resin on default srun port 6802.

Unhappy case 1:
1. I start server A and login to my application
2. I stop Server A and start Server B
3. I continue to work in the browser, my session stays intact and i can
proceed normally
4. I stop Server B and start Server A
5. I continue to work in the browser, my session stays intact and i can
proceed normally
6. I logout from my application and logout successfully
cleared my session variables (notice this from app log)
7. I try to type a password protected page in the browser and i
am forced to login
8. I stop Server A and start Server B
9. I try to type a password protected page in the
browser and i CAN ACCESS the protected page

Unhappy case 2:
1. I start server A and login to my application
2. I stop Server A and start Server B
3. I continue to work in the browser, my session stays intact and i can
proceed normally
4. I logout from my application and logout
successfully cleared my session variables (notice this from app log)
5. I stop Server B and start Server A
6. I try to type a password protected page in the
browser and i CAN ACCESS the protected page

So to sum it all up, if i login to Server A and try to log out
in Server B, the session is still available to server A and not Server
B.
Does anyone here encounter this before?

Thanks.
-- 
Warm regards,
Jacky Wong





___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Question on db based distributed session

2007-01-08 Thread Jacky




Dear all,

First of all, thanks for all the attentions. Greatly appreciated.

Josh,
- Please forgive me as i do not understand your "have your cake and eat
it too" metaphor :S
- I'm trying to implement the database backed distributed sessions as
shown in http://www.caucho.com/resin-3.0/config/sessions.xtp and i dont
take "turn it off" as a solution, at least not until i fully understand
that this will not work.
- You may be right with the clock of server A and server B not in sync,
I'll have it checked..

Eric,

- Yes, resin knows about my load balanced cluster (refer to the
specific settings below)
- I'm using apache with mod_caucho as the load balancer, is this inside
or outside? :D
- No, i'm not using . I didnt' think that i
need (but i'll give it a shot). Referring to
http://www.caucho.com/resin-3.0/config/sessions.xtp, there is a
paragraph stating this:

"For efficiency, the owning JVM keeps a cache of the
session value, so
it only needs to query the database when the session changes. If another JVM
stores a new session value, it will notify the owner of the change so
the owner can update its cache. Because of this notification,
the database
store is cluster-aware."

my specific settings:

#Apache snippet

  DocumentRoot /www/appA
  ServerName somedomain.com
  DirectoryIndex index.jsp
  ResinConfigServer 192.168.1.1 6802
  ResinConfigServer 192.168.1.2 6802
  CauchoStatus yes

  # do not remove, otherwise apache will serve the jsp source code once
resin is down
  AddHandler caucho-request .jsp


# Resin snippet
    
    
  120s
  
  
    

  
    
  jdbc/session
    
  

    
  
    
  
  180
  
  
    
    
  
    

Sam,

I have 2 questions:

Quote:

At this point, A (the primary) will contact B to try to get any updates
to the session that have been made.  Since B is down, A cannot get the
session from it. 

- Since i use , shouldn't it try to get from B, but couldn't it get from the DB?

Quote:

So it has to go with the outdated session that it
has, because it cannot get the updated session from B.

- Please do correct me if i'm wrong, referring to this:

"If another JVM stores a new session value, it will notify the owner of the change so
the owner can update its cache.  Because of this notification, the database
store is cluster-aware."

- When B logs out my session, shouldn't it updates A's cache and the database at the same time?
- Is it because i didn't use  ??

Gary Zhu,

Quote:
Even if server A and server B are configured to use the same database on server C, for a particular user session (say session id: abcDGs299928), server A and server B will have two different database entries of the session data, am I getting it right ?

- I have thought of this as well when i look at the records in the table persistent_session of my mysql database.
- But still...

"If another JVM stores a new session value, it will notify the owner of the change so
the owner can update its cache.  Because of this notification, the database
store is cluster-aware."

PS:
Apache/2.0.55
Resin professional 3.0.19.

Thanks all !!


Warm regards,
Jacky Wong
Software Engineer
Qinetics Solution Berhad



Sam wrote:

  

  1. I start server A and login to my application
  

  
  
At this point, A will get your request and will become your primary
server, and B will be your secondary server.

  
  

  2. I stop Server A and start Server B
3. I continue to work in the browser, my session stays intact and i 
can proceed normally
  

  
  
At this point, you are using secondary server B.  Your session updates
are saved on B.

  
  

  4. I logout from my application and logout successfully cleared my 
session variables (notice this from app log)
5. I stop Server B and start Server A
  

  
  
  
  

  6. I try to type a password protected page in the browser and i *CAN 
ACCESS* the protected page
  

  
  
At this point, A (the primary) will contact B to try to get any updates
to the session that have been made.  Since B is down, A cannot get the
session from it.  So it has to go with the outdated session that it
has, because it cannot get the updated session from B.

-- Sam

___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

  




___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Question on db based distributed session

2007-01-15 Thread Jacky




Eric? Sam?
Warm regards,
Jacky Wong
Software Engineer
Qinetics Solution Berhad



Jacky wrote:

  
  
  Dear all,
  
First of all, thanks for all the attentions. Greatly appreciated.
  
Josh,
- Please forgive me as i do not understand your "have your cake and eat
it too" metaphor :S
- I'm trying to implement the database backed distributed sessions as
shown in http://www.caucho.com/resin-3.0/config/sessions.xtp
and i dont
take "turn it off" as a solution, at least not until i fully understand
that this will not work.
- You may be right with the clock of server A and server B not in sync,
I'll have it checked..
  
Eric,
  
- Yes, resin knows about my load balanced cluster (refer to the
specific settings below)
- I'm using apache with mod_caucho as the load balancer, is this inside
or outside? :D
- No, i'm not using . I didnt' think that i
need (but i'll give it a shot). Referring to
  http://www.caucho.com/resin-3.0/config/sessions.xtp,
there is a
paragraph stating this:
  
  "For efficiency, the owning JVM keeps a cache of the
session value, so
it only needs to query the database when the session changes. If another JVM
stores a new session value, it will notify the owner of the change so
the owner can update its cache. Because of this notification,
the database
store is cluster-aware."
  
  my specific settings:
  
#Apache snippet

  DocumentRoot /www/appA
  ServerName somedomain.com
  DirectoryIndex index.jsp
  ResinConfigServer 192.168.1.1 6802
  ResinConfigServer 192.168.1.2 6802
  CauchoStatus yes
  
  # do not remove, otherwise apache will serve the jsp source code once
resin is down
  AddHandler caucho-request .jsp

  
# Resin snippet
    
    
  120s
  
  
    
  
  
    
  jdbc/session
    
  
  
    
  
    
  
  180
  
  
    
    
  
    
  
Sam,
  
  I have 2 questions:
  Quote:

At this point, A (the primary) will contact B to try to get any updates
to the session that have been made.  Since B is down, A cannot get the
session from it. 

- Since i use , shouldn't it try to get from B, but couldn't it get from the DB?

Quote:

So it has to go with the outdated session that it
has, because it cannot get the updated session from B.

- Please do correct me if i'm wrong, referring to this:

"If another JVM stores a new session value, it will notify the owner of the change so
the owner can update its cache.  Because of this notification, the database
store is cluster-aware."

- When B logs out my session, shouldn't it updates A's cache and the database at the same time?
- Is it because i didn't use  ??

Gary Zhu,

Quote:
Even if server A and server B are configured to use the same database on server C, for a particular user session (say session id: abcDGs299928), server A and server B will have two different database entries of the session data, am I getting it right ?

- I have thought of this as well when i look at the records in the table persistent_session of my mysql database.
- But still...

"If another JVM stores a new session value, it will notify the owner of the change so
the owner can update its cache.  Because of this notification, the database
store is cluster-aware."

PS:
Apache/2.0.55
Resin professional 3.0.19.

Thanks all !!
  
  Warm regards,
Jacky Wong
Software Engineer
Qinetics Solution Berhad
  
  
  
Sam wrote:
  

  
1. I start server A and login to my application
  
  


At this point, A will get your request and will become your primary
server, and B will be your secondary server.

  

  
2. I stop Server A and start Server B
3. I continue to work in the browser, my session stays intact and i 
can proceed normally
  
  


At this point, you are using secondary server B.  Your session updates
are saved on B.

  

  
4. I logout from my application and logout successfully cleared my 
session variables (notice this from app log)
5. I stop Server B and start Server A
  
  


  

  
6. I try to type a password protected page in the browser and i *CAN 
ACCESS* the protected page
  
  


At this point, A (the primary) will contact B to try to get any updates
to the session that have been made.  Since B is down, A cannot get the
session from it.  So it has to go with the outdated session that it
has, because it cannot get the updated session from B.

-- Sam

___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

  
  
  

___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest
  




___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Question on db based distributed session

2007-01-15 Thread Jacky




Gary, thanks for the reply.
Warm regards,
Jacky Wong
Software Engineer
Qinetics Solution Berhad



Gary Zhu wrote:

  
  
  
  Jacky,
   
  Whatever you quoted (in red) does not apply to
your case, because in most of your situations, you did not have
another Resin instance to be notified, as in "it will notify the owner of the change" At
some point of step 2 and step 5, you did not even have any Resin
instance running.
   
  But that does not mean this is not a problem.
JDBC based session store should always contain the last known valid
state, no matter which server was running.  I noticed that your case
has been filed into Resin bug http://bugs.caucho.com/view.php?id=1544.
   
  So, stop worrying.
   
   
  
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jacky
Sent: Monday, January 15, 2007 2:17 AM
To: General Discussion for the Resin application server
Subject: Re: [Resin-interest] Question on db based
distributed session


Eric? Sam?
Warm regards,
Jacky Wong
Software Engineer
Qinetics Solution Berhad



Jacky wrote:
Dear all,
  
First of all, thanks for all the attentions. Greatly appreciated.
  
Josh,
- Please forgive me as i do not understand your "have your cake and eat
it too" metaphor :S
- I'm trying to implement the database backed distributed sessions as
shown in http://www.caucho.com/resin-3.0/config/sessions.xtp
and i dont take "turn it off" as a solution, at least not until i fully
understand that this will not work.
- You may be right with the clock of server A and server B not in sync,
I'll have it checked..
  
Eric,
  
- Yes, resin knows about my load balanced cluster (refer to the
specific settings below)
- I'm using apache with mod_caucho as the load balancer, is this inside
or outside? :D
- No, i'm not using . I didnt' think that i
need (but i'll give it a shot). Referring to http://www.caucho.com/resin-3.0/config/sessions.xtp,
there is a paragraph stating this:
  
  "For efficiency, the owning JVM keeps a cache of
the session value, so it only needs to query the database when the
session changes. If another JVM stores a new
session value, it will notify the owner of the change so the owner can
update its cache. Because of this notification, the database
store is cluster-aware."
  
  my specific settings:
  
#Apache snippet

  DocumentRoot /www/appA
  ServerName somedomain.com
  DirectoryIndex index.jsp
  ResinConfigServer 192.168.1.1 6802
  ResinConfigServer 192.168.1.2 6802
  CauchoStatus yes
  
  # do not remove, otherwise apache will serve the jsp source code once
resin is down
  AddHandler caucho-request .jsp

  
# Resin snippet
    
    
  120s
  
  
    
  
  
    
  jdbc/session
    
  
  
    
  
    
  
  180
  
  
    
    
  
    
  
Sam,
  
  I have 2 questions:
  Quote:

At this point, A (the primary) will contact B to try to get any updates
to the session that have been made.  Since B is down, A cannot get the
session from it. 

- Since i use , shouldn't it try to get from B, but couldn't it get from the DB?

Quote:

So it has to go with the outdated session that it
has, because it cannot get the updated session from B.

- Please do correct me if i'm wrong, referring to this:

"If another JVM stores a new session value, it will notify the owner of the change so
the owner can update its cache.  Because of this notification, the database
store is cluster-aware."

- When B logs out my session, shouldn't it updates A's cache and the database at the same time?
- Is it because i didn't use  ??

Gary Zhu,

Quote:
Even if server A and server B are configured to use the same database on server C, for a particular user session (say session id: abcDGs299928), server A and server B will have two different database entries of the session data, am I getting it right ?

- I have thought of this as well when i look at the records in the table persistent_session of my mysql database.
- But still...

"If another JVM stores a new session value, it will notify the owner of the change so
the owner can update its cache.  Because of this notification, the database
store is cluster-aware."

PS:
Apache/2.0.55
Resin professional 3.0.19.

Thanks all !!
  
  Warm regards,
Jacky Wong
Software Engineer
Qinetics Solution Berhad
  
  
  
Sam wrote:
  

  
1. I start server A and login to my application
  
  


At this point, A will get your request and will become your primary
server, and B will be your secondary server.

  

  
2. I stop Server A and start Server B
3. I continue to work in the browser, my session stays intac

Re: [Resin-interest] File Upload

2007-01-23 Thread Jacky




Smallest file is 3 bytes. Just tried with 0 bytes, successful as
well.
Using commons-fileupload-1.0.jar, resin 3.0.19 open source, linux
2.6.18-1.2257.fc5

Warm regards,
Jacky Wong
Software Engineer
Qinetics Solution Berhad



sksamuel wrote:

  Does anyone use file upload from Jakata with resin? If so, what is the 
smallest file you can upload? Strange question I know but I'm having issues 
with small text files on resin only.





___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

  




___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] Make fails in 3.1..functions rewritten ?

2008-03-15 Thread Jacky John
I am getting errors while compiling resin. Configure works fine, but make fails 
at this step. Server is CentOS 5.1 and java version is jdk1.5.0_14. I tried 
with almost all 3.1.x versions and old snapshots. Is this a bug or an issue 
with my server and brain ?

Can some one shed some light ? I see the related code (the functions file) has 
changed recently in 3.1 

GCC is default coming with CentOS - gcc version 4.1.2 20070626

'
EGREP="grep -E" /home/setup/resin-3.1.s080304/libtool --silent --mode=compile 
gcc -o mod_caucho.lo -c -I/usr/local/apache/include 
-DRESIN_HOME=\"/root/setup/resin-3.1.s080304\" -I../common -g -O2 -DPOLL 
-DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DOPENSSL -DLINUX=22 
-DHAVE_SET_DUMPABLE -I/usr/include/gdbm -DMOD_SSL=208131 -DUSE_HSREGEX -DEAPI 
mod_caucho.c
mod_caucho.c: In function 'cse_config_server_command':
mod_caucho.c:261: warning: passing argument 1 of 'cse_add_config_server' from 
incompatible pointer type
mod_caucho.c:261: warning: passing argument 2 of 'cse_add_config_server' from 
incompatible pointer type
mod_caucho.c:261: warning: passing argument 3 of 'cse_add_config_server' makes 
pointer from integer without a cast
mod_caucho.c:261: error: too few arguments to function 'cse_add_config_server'
mod_caucho.c: In function 'cse_host_command':
mod_caucho.c:333: warning: passing argument 1 of 'cse_add_host' from 
incompatible pointer type
mod_caucho.c:333: warning: passing argument 2 of 'cse_add_host' from 
incompatible pointer type
mod_caucho.c:333: warning: passing argument 3 of 'cse_add_host' makes pointer 
from integer without a cast
mod_caucho.c:333: error: too few arguments to function 'cse_add_host'
mod_caucho.c: In function 'cse_backup_command':
mod_caucho.c:365: warning: passing argument 1 of 'cse_add_backup' from 
incompatible pointer type
mod_caucho.c:365: warning: passing argument 2 of 'cse_add_backup' from 
incompatible pointer type
mod_caucho.c:365: warning: passing argument 3 of 'cse_add_backup' makes pointer 
from integer without a cast
mod_caucho.c:365: error: too few arguments to function 'cse_add_backup'
make[2]: *** [mod_caucho.lo] Error 1
make[2]: Leaving directory `/home/setup/resin-3.1.s080304/modules/c/src/apache1'
make[1]: *** [plugins] Error 2
make[1]: Leaving directory `/home/setup/resin-3.1.s080304/modules/c/src'
make: *** [all] Error 2
___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest