Re: [Resin-interest] Any way to override resin's HttpServletRequest implementation?

2012-02-22 Thread Rachel McConnell
Thanks.  I will come up with an alternative.

Rachel

On Wed, Feb 22, 2012 at 3:27 PM, Scott Ferguson f...@caucho.com wrote:

 **
 On 02/22/2012 02:32 PM, Rachel McConnell wrote:

 For various reasons too annoying to detail, it may be useful for us to
 change one minor behavior of the HttpServletRequest object.  Is it possible
 in Resin 3.0.x to substitute a custom implementation of this class for
 caucho's?  Is it possible in later versions?  A cursory search of google
 and caucho.com doesn't show up a way but I figured I would ask the
 source.

  A response of No it can't be done would be just as helpful as here's
 how!


 I've added it as a bug report, but it's not currently possible.

 With Resin 4.0, adding that capability would be a fairly straightforward
 change.

 -- Scott



 ___
 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] MySQL issues with 4.0.18

2011-05-26 Thread Rachel McConnell
You probably have your mysql server configured to only accept socket
connections, and not TCP/IP connections.  As a rule, external client
programs use TCP/IP by default, as sockets can only be used if the db
server is on the same machine as the client program and this is often
not the case for production applications.  See
http://dev.mysql.com/doc/refman/5.0/en/connecting.html for more
information.

Rachel

On Thu, May 26, 2011 at 4:29 PM, Rick Mann rm...@latencyzero.com wrote:
 I'm trying to set my webapp up on a new server, and running into something 
 I've never seen before. Google has solutions for people that worked, but none 
 of them work for me.

 The same config on OpenSolaris and OS X work (albeit with different versions 
 of MySQL and Resin). I'm not sure if this is new with 4.0.18 or not.

 I have MySQL and Resin 4.0.18 running on the same host. I have my Java 
 webapp, and WordPress both installed. Whenever either one tries to access the 
 DB, access is refused. Each webapp uses its own user/password. I've verified 
 that I can access MySQL via the mysql command-line client using both sets of 
 credentials.

 WordPress reports this error:

 /lz/usr/wordpress/wp-includes/wp-db.php:509: Warning: A link to the server 
 could not be established. 
 url=jdbc:mysql://localhost:3306/?characterEncoding=ISO8859_1 
 driver=com.mysql.jdbc.Driver 
 com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link 
 failure The last packet sent successfully to the server was 0 milliseconds 
 ago. The driver has not received any packets from the server. [mysql_error]

 MySQL: 5.5.12
 Connector/J: 5.1.15
 Resin: 4.0.18
 OS: 4.4.3-4ubuntu5

 My Java app reports Connection refused (long stacktrace follows). The MySQL 
 JDBC connector is in webapp-jars. The config for the Java webapp looks like:

 database
    jndi-namejdbc/mydb/jndi-name
    max-connections1024/max-connections
    max-idle-time30s/max-idle-time
    driver
        
 typecom.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource/type
        urljdbc:mysql://localhost:3306/mydb/url
        usermydb/user
        password#/password
    /driver
 /database

 WordPress config:

 define('DB_NAME', 'wordpress');
 define('DB_USER', 'wordpress');
 define('DB_PASSWORD', '');
 define('DB_HOST', 'localhost');
 define('DB_CHARSET', 'utf8');
 define('DB_COLLATE', '');

 Webapp error:

 java.net.ConnectException: Connection refused


 javax.servlet.ServletException: 
 org.springframework.transaction.CannotCreateTransactionException:
 Could not open Hibernate Session for transaction; nested exception is 
 org.hibernate.exception.JDBCConnectionException:
 Cannot open connection
        at 
 org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
        at 
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:119)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:96)
        at 
 com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109)
        at com.latencyzero.satdb.RequestFilter.doFilter(RequestFilter.java:124)
        at 
 com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:89)
        at 
 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
        at 
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at 
 com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:89)
        at 
 com.latencyzero.satdb.SecurityFilter.doFilter(SecurityFilter.java:228)
        at 
 com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:89)
        at 
 com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156)
        at 
 com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95)
        at 
 com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:287)
        at 
 com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:792)
        at 
 com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:730)
        at 
 com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:689)
        at 
 com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:669)
        at 
 com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:617)
        at com.caucho.network.listen.AcceptTask.doTask(AcceptTask.java:104)
        at 
 com.caucho.network.listen.ConnectionReadTask.runThread(ConnectionReadTask.java:98)
        at 
 com.caucho.network.listen.ConnectionReadTask.run(ConnectionReadTask.java:81)
        at com.caucho.network.listen.AcceptTask.run(AcceptTask.java:67)
        at 

Re: [Resin-interest] Question about Resin 4.0.6

2010-05-07 Thread Rachel McConnell
This comment isn't helpful I know but I am very curious about this.
The code you quoted is a tag library call using the EL.  How is that
not part of the UI?  Are you writing controllers in JSP somehow?

Rachel

On Fri, May 7, 2010 at 2:47 PM, Aaron Freeman aaron.free...@layerz.com wrote:
 This isn't in the UI layer.  This is in a controller.  At any rate there is
 a simple work around, but this sure doesn't seem like it should be
 generating an error.  If a property doesn't exist on an object it sure seems
 like the test for empty=true should work, and not throw a runtime error.

 At any rate there are easy workarounds in this case but workarounds make the
 code uglier.

 Aaron


 On 5/7/2010 3:57 PM, Jon Stevens wrote:

 I don't know if there is a way and it isn't something I'd depend on in the
 UI layer. Think of [class] like you'd think of an interface. You really
 should only put implementations of interfaces into the context. Otherwise,
 I'd consider putting a Map in there for the effect you want.
 jon

 On Fri, May 7, 2010 at 1:43 PM, Aaron Freeman aaron.free...@layerz.com
 wrote:

 Bummer, what's the proper way to test if a property exists then, since
 ${!empty [class].[property]} isn't the correct way?

 Thanks,

 Aaron


 On 5/7/2010 3:07 PM, Jon Stevens wrote:

 That is what JBoss does, so I'd say that Caucho fixed a bug.
 jon

 On Fri, May 7, 2010 at 12:59 PM, Aaron Freeman aaron.free...@layerz.com
 wrote:

 We are system testing Resin 4.0.6 with our old code base and found a
 curiosity.  The following code used to work, regardless of what type
 receipt is:

 c:if test=${!empty receipt.details}

 Under Resin 3.0.x if receipt was a HashMap and had a details property
 then it would return true.  If it was a HashMap and did not have a
 details property, it would correctly return false.  And (most
 importantly), if receipt was _any_ other class, including built in java
 classes, it would just return false.  With Resin 4.0.6 it now throws an
 error:

 'details' is an unknown bean property of 'java.math.BigDecimal'

 That's not the expected behavior is it?

 Thanks,

 Aaron




 ___
 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] Resin 3.1: resin:import of jvm-args

2009-11-30 Thread Rachel McConnell
Hi Aaron,

Maybe I am missing something, but if you can pass in
-Dconfiguration=wherever to your individual machines (in your
/etc/init.d/resin script or wherever, I assume?), can't you pass in your
server specific JVM args there too?

Rachel

On Mon, Nov 30, 2009 at 12:08 PM, Aaron Freeman aaron.free...@layerz.comwrote:

 Thanks Alex.  My problem isn't with multiple servers on a single machine
 though.  I have multiple machines, each with one server, and a few of
 the machines need a different set of jvm-args.  I was trying to get by
 with one Resin configuration file where I could pass in a
 -Dconfiguration={something} and then resin:import
 path=.../${configuration}/*.xml (not literally, I was using the
 fileset option of resin:import).  It's working great except the one
 little snafu of not being able to import jvm-arg settings.

 I think I will just have to throw some resin:choose around the jvm-arg
 stuff.

 Aaron


 ___
 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] Resin 3.1: resin:import of jvm-args

2009-11-30 Thread Rachel McConnell
Well, they are JVM system variables so it isn't so much that
ResinWatchdogManager would pass them to the server, but that they're set in
the JVM when it's started and anything in that runtime instance will have
them available.  My startup script uses this technique and it works great.
 I suppose it is possible that a later version changed this behavior (we're
still on 3.0.21) but I'd be extremely surprised if that's the case.

Rachel

On Mon, Nov 30, 2009 at 1:25 PM, Aaron Freeman aaron.free...@layerz.comwrote:


   Aaron,
 
  Maybe I am missing something, but if you can pass in
  -Dconfiguration=wherever to your individual machines (in your
  /etc/init.d/resin script or wherever, I assume?), can't you pass in
  your server specific JVM args there too?
 
  Rachel
 Probably.  The configuration is passed in via an environment variable,
 but I could pass those in dynamically too if I have too.  If we set
 those from our resin script will the ResinWatchdogManager pass the same
 values to the actual Resin server, when it launches it?  I wasn't sure,
 so I was just going by the example resin.conf file that comes with Resin
 3.1.9.

 Aaron


 ___
 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] Automated deployment?

2009-11-11 Thread Rachel McConnell
I use a tool called Capistrano (http://www.capify.org/) to do very similar
set of tasks.  Capistrano was written for Rails apps so I had to do a fair
amount of scripting, including splitting out all my servers into separate
tasks, but once I got this done it works extremely well.  It requires Ruby
on the machine you're managing the process from, but of itself it only calls
shell tasks on the remote machines so Ruby need not be installed on those.

I too would be interested in what others use for this.

Rachel

On Wed, Nov 11, 2009 at 7:28 PM, Adam Allgaier allgai...@yahoo.com wrote:

 We currently have a cluster of Resin web servers sitting behind a load
 balancer.  What do you recommend for automating/scripting deployment?

 Our script would look something like this:

 for each web server:
   - disable web server on the load balancer
   - upload application files (jsps + jars)
   - restart resin
   - enable on the balancer
   - wait a minute
   - go to next web server

 I'm not sure where to start on something like this, so you wisdom is much
 appreciated!

 Adam  :-)






 ___
 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] Why Apache?

2009-03-10 Thread Rachel McConnell
Static file serving, perhaps?  I don't know the current benchmarks but
Apache has always had the reputation of being very fast for static
files, whereas that's not what resin is optimized for.

I say this from the POV of not using Apache at all, though: we use
resin behind HAProxy for load balancing, and a lighttpd instance for
image files.

Rachel

On Tue, Mar 10, 2009 at 10:14 AM, Aaron Freeman
aaron.free...@layerz.com wrote:
 After watching a few of these threads about people using mod_caucho with
 Apache, it dawned on me to ask an open-ended question:

 Why use Apache at all?

 I am sure there are good reasons for it out there, so I am just curious what
 the use-case is for using Apache plus Resin instead of using just Resin?



 ___
 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] URL rewrite syntax problem

2009-01-02 Thread Rachel McConnell
Hello all,

I have a URL that I would like to permanently redirect.  The original is:

http://localhost/confirm/?c=ZK2G372GLJBMGQ7MVVX2LJW7

and I want to redirect it to

http://localhost/account/confirm/?c=ZK2G372GLJBMGQ7MVVX2LJW7

In my resin.conf file, I have this code which does not work:

  server
rewrite-dispatch
  moved-permanently regexp=^/confirm/ target=/account/confirm//
/rewrite-dispatch
...
  /server

The result is that my application still gets the request for /confirm.
 I tried adjusting it to this (dropping the ^ character):

  server
rewrite-dispatch
  moved-permanently regexp=/confirm/ target=/account/confirm//
/rewrite-dispatch
...
  /server

In this case I get a circular redirect, a neverending URL like

http://localhost/account/account/account/account/ ...
/account/account/confirm/?c=ZK2G372GLJBMGQ7MVVX2LJW7

where the /confirm/ is replaced by /account/confirm/, indefinitely,
until the browser gives up.  This is what I would expect.  But I
haven't any idea why the first one is wrong.  Surely I am missing
something very simple... Any help much appreciated, even a log level
that might shed light on this (I tried some work with this but wasn't
able to find any useful output).

Thanks,
Rachel


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


[Resin-interest] resin 3.1.6 startup options, no -pid ?

2008-10-06 Thread Rachel McConnell
I'm upgrading from resin 3.1.1 to 3.1.6 which is, I believe, the
current stable version.  I tried my existing startup script and got
this error:

[EMAIL PROTECTED] local]# /etc/init.d/resin start
unknown argument '-pid'

usage: java -jar resin.jar [-options] [status | start | stop | restart
| kill | shutdown]

where options include:
   -conf file  : select a configuration file
   -log-directory dir  : select a logging directory
   -resin-home dir : select a resin home directory
   -root-directory dir : select a root directory
   -server id  : select a server to run
   -watchdog-port port : override the watchdog-port
   -verbose  : print verbose starting information

The relevant bit of the startup script is:

su $USER -c $HTTPD start -verbose -J-server -J-Xms1024m -J-Xmx1024m \
 -Djava.awt.headless=true -pid $PID -jvm-log $JVMLOG \
 -stdout $STDOUT -stderr $STDERR $*

where the $VARIABLES have reasonable values.

I checked the resin docs and the wiki but could not find any
information on the -pid option.  I'd like to retain it as the stop
script uses it as a backup shutdown method.  Can anyone point me to
documentation on this?

Thanks,
Rachel


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


Re: [Resin-interest] resin 3.1.6 startup options, no -pid ?

2008-10-06 Thread Rachel McConnell
Thanks Scott.  Can the watchdog handle multiple resin instances on the
same machine, where each is started up with a different resin.conf
script from the same resin home?  Our webapps are the same for each,
and the resin install is the same, but the server configuration is
different so we use different startup scripts.  We do not use resin's
built-in clustering.

Rachel

On Mon, Oct 6, 2008 at 5:24 PM, Scott Ferguson [EMAIL PROTECTED] wrote:

 On Oct 6, 2008, at 12:49 PM, Rachel McConnell wrote:

 I'm upgrading from resin 3.1.1 to 3.1.6 which is, I believe, the
 current stable version.  I tried my existing startup script and got
 this error:

 [EMAIL PROTECTED] local]# /etc/init.d/resin start
 unknown argument '-pid'

 usage: java -jar resin.jar [-options] [status | start | stop | restart
 | kill | shutdown]

 where options include:
   -conf file  : select a configuration file
   -log-directory dir  : select a logging directory
   -resin-home dir : select a resin home directory
   -root-directory dir : select a root directory
   -server id  : select a server to run
   -watchdog-port port : override the watchdog-port
   -verbose  : print verbose starting information

 The relevant bit of the startup script is:

 su $USER -c $HTTPD start -verbose -J-server -J-Xms1024m -J-Xmx1024m \
 -Djava.awt.headless=true -pid $PID -jvm-log $JVMLOG \
 -stdout $STDOUT -stderr $STDERR $*

 where the $VARIABLES have reasonable values.

 I checked the resin docs and the wiki but could not find any
 information on the -pid option.  I'd like to retain it as the stop
 script uses it as a backup shutdown method.  Can anyone point me to
 documentation on this?

 The -pid doesn't exist in 3.1.x because of the switch to the watchdog
 mechanism.  The watchdog keeps track of the pids internally.

 -- Scott



 Thanks,
 Rachel


 ___
 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