[Resin-interest] Custom startup recommendation

2010-08-31 Thread Mattias Jiderhamn
(I am not by far a *nix wizz, nor the admin of our production servers, 
so please bear with me)

Historically we have edited the /etc/init.d/resin script to customize 
the Resin startup, such as setting the server root directory or 
assigning CPU cores with taskdef.
In the 4.0.x branch this file is overwritten at each minor upgrade by 
"make install". Does this mean this is (no longer) the recommended way 
of configuring the startup, and there is some other means we should look 
at instead...?

-- 

   



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


[Resin-interest] resin.exe server root directory in 4.0.10

2010-08-31 Thread Mattias Jiderhamn
Trying to launch Resin 4.0.10 on Windows with the -server-root / 
-server_root / -root-directory / --root-directory but resin.exe seems to 
ignore all of them. Is there an undocumented change, or is there a bug 
in resin.exe in the 4.0.10 (pro) release?

-- 

   



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


Re: [Resin-interest] Custom startup recommendation

2010-08-31 Thread jkowall
Depends on the version of Unix you are on exactly.  I customized the init
script quite a bit, so I don't use the one which ships with Resin.  Which
version/distribution are you using?  I can share the one I use if you'd
like.

-jk


On Tue, Aug 31, 2010 at 4:10 AM, Mattias Jiderhamn <
mj-li...@expertsystems.se> wrote:

> (I am not by far a *nix wizz, nor the admin of our production servers,
> so please bear with me)
>
> Historically we have edited the /etc/init.d/resin script to customize
> the Resin startup, such as setting the server root directory or
> assigning CPU cores with taskdef.
> In the 4.0.x branch this file is overwritten at each minor upgrade by
> "make install". Does this mean this is (no longer) the recommended way
> of configuring the startup, and there is some other means we should look
> at instead...?
>
> --
>
>   
>
>
>
> ___
> 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] Custom startup recommendation

2010-08-31 Thread Mattias Jiderhamn

We are on RedHat Enterprise Linux 4/5.

Note that the question is not the configuration itself, but *where* is 
the proper place for such configuration. The file we use now is 
overwritten with "the one which ships with Resin" on every Resin update.




jkowall wrote (2010-08-31 14:19):
Depends on the version of Unix you are on exactly.  I customized the 
init script quite a bit, so I don't use the one which ships with 
Resin.  Which version/distribution are you using?  I can share the one 
I use if you'd like.


-jk


On Tue, Aug 31, 2010 at 4:10 AM, Mattias Jiderhamn 
mailto:mj-li...@expertsystems.se>> wrote:


(I am not by far a *nix wizz, nor the admin of our production servers,
so please bear with me)

Historically we have edited the /etc/init.d/resin script to customize
the Resin startup, such as setting the server root directory or
assigning CPU cores with taskdef.
In the 4.0.x branch this file is overwritten at each minor upgrade by
"make install". Does this mean this is (no longer) the recommended way
of configuring the startup, and there is some other means we
should look
at instead...?

--





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


Re: [Resin-interest] Custom startup recommendation

2010-08-31 Thread jkowall
On RHEL, it should be /etc/init.d/ for sure, and you manage the startup
scripts with /sbin/sysconfig

-jk


On Tue, Aug 31, 2010 at 8:38 AM, Mattias Jiderhamn <
mj-li...@expertsystems.se> wrote:

>  We are on RedHat Enterprise Linux 4/5.
>
> Note that the question is not the configuration itself, but *where* is the
> proper place for such configuration. The file we use now is overwritten with
> "the one which ships with Resin" on every Resin update.
>
>  
>
> jkowall wrote (2010-08-31 14:19):
>
> Depends on the version of Unix you are on exactly.  I customized the init
> script quite a bit, so I don't use the one which ships with Resin.  Which
> version/distribution are you using?  I can share the one I use if you'd
> like.
>
> -jk
>
>
> On Tue, Aug 31, 2010 at 4:10 AM, Mattias Jiderhamn <
> mj-li...@expertsystems.se> wrote:
>
>> (I am not by far a *nix wizz, nor the admin of our production servers,
>> so please bear with me)
>>
>> Historically we have edited the /etc/init.d/resin script to customize
>> the Resin startup, such as setting the server root directory or
>> assigning CPU cores with taskdef.
>> In the 4.0.x branch this file is overwritten at each minor upgrade by
>> "make install". Does this mean this is (no longer) the recommended way
>> of configuring the startup, and there is some other means we should look
>> at instead...?
>>
>> --
>>
>>   
>
>
>
> ___
> 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] Custom startup recommendation

2010-08-31 Thread Mattias Jiderhamn
How then are you supposed to go about upgrading Resin? Is there a 
parameter to the "configure" script to avoid creating/overwriting 
/etc/init.d/resin?

If not, could such parameter be added...?



jkowall wrote (2010-08-31 14:45):
On RHEL, it should be /etc/init.d/ for sure, and you manage the 
startup scripts with /sbin/sysconfig


-jk


On Tue, Aug 31, 2010 at 8:38 AM, Mattias Jiderhamn 
mailto:mj-li...@expertsystems.se>> wrote:


We are on RedHat Enterprise Linux 4/5.

Note that the question is not the configuration itself, but
*where* is the proper place for such configuration. The file we
use now is overwritten with "the one which ships with Resin" on
every Resin update.



jkowall wrote (2010-08-31 14:19):

Depends on the version of Unix you are on exactly.  I customized
the init script quite a bit, so I don't use the one which ships
with Resin.  Which version/distribution are you using?  I can
share the one I use if you'd like.

-jk


On Tue, Aug 31, 2010 at 4:10 AM, Mattias Jiderhamn
mailto:mj-li...@expertsystems.se>> wrote:

(I am not by far a *nix wizz, nor the admin of our production
servers,
so please bear with me)

Historically we have edited the /etc/init.d/resin script to
customize
the Resin startup, such as setting the server root directory or
assigning CPU cores with taskdef.
In the 4.0.x branch this file is overwritten at each minor
upgrade by
"make install". Does this mean this is (no longer) the
recommended way
of configuring the startup, and there is some other means we
should look
at instead...?

--







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


Re: [Resin-interest] Custom startup recommendation

2010-08-31 Thread Emil Ong
I think we can count this as a bug:

http://bugs.caucho.com/view.php?id=4195

We should at least have an option not to override your existing
/etc/init.d/resin -- we do recommend editing this file with your local
changes.

Best,
Emil

On Tue, Aug 31, 2010 at 03:20:34PM +0200, Mattias Jiderhamn wrote:
> How then are you supposed to go about upgrading Resin? Is there a parameter to
> the "configure" script to avoid creating/overwriting /etc/init.d/resin?
> If not, could such parameter be added...?
> 
>  
> 
> jkowall wrote (2010-08-31 14:45):
> 
> On RHEL, it should be /etc/init.d/ for sure, and you manage the startup
> scripts with /sbin/sysconfig 
> 
> -jk
> 
> 
> On Tue, Aug 31, 2010 at 8:38 AM, Mattias Jiderhamn <
> mj-li...@expertsystems.se> wrote:
> 
> We are on RedHat Enterprise Linux 4/5.
> 
> Note that the question is not the configuration itself, but *where* is
> the proper place for such configuration. The file we use now is
> overwritten with "the one which ships with Resin" on every Resin
> update.
> 
>  
> 
> jkowall wrote (2010-08-31 14:19):
> 
> Depends on the version of Unix you are on exactly.  I customized
> the init script quite a bit, so I don't use the one which ships
> with Resin.  Which version/distribution are you using?  I can 
> share
> the one I use if you'd like.
> 
> -jk
> 
> 
> On Tue, Aug 31, 2010 at 4:10 AM, Mattias Jiderhamn <
> mj-li...@expertsystems.se> wrote:
> 
> (I am not by far a *nix wizz, nor the admin of our production
> servers,
> so please bear with me)
> 
> Historically we have edited the /etc/init.d/resin script to
> customize
> the Resin startup, such as setting the server root directory 
> or
> assigning CPU cores with taskdef.
> In the 4.0.x branch this file is overwritten at each minor
> upgrade by
> "make install". Does this mean this is (no longer) the
> recommended way
> of configuring the startup, and there is some other means we
> should look
> at instead...?
> 
> --
> 
>   
> 
> 
> 
> 

> ___
> 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.exe server root directory in 4.0.10

2010-08-31 Thread Scott Ferguson
Mattias Jiderhamn wrote:
> Trying to launch Resin 4.0.10 on Windows with the -server-root / 
> -server_root / -root-directory / --root-directory but resin.exe seems to 
> ignore all of them. Is there an undocumented change, or is there a bug 
> in resin.exe in the 4.0.10 (pro) release?
>   

Do you see the same issue with java -jar lib/resin.jar start?

That's certainly a bug, although I'm not sure why that would be 
different on windows.

-- Scott



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


[Resin-interest] Best way to access compiled PHP code from within Java

2010-08-31 Thread Alexandre Bertails
Hi all,

I'm trying to programmatically execute PHP scripts from within Java
[1] (actually Scala in my case but it's the same). I took some
inspiration from CliQuercus.java as some features were not activated
by default. For example, the database connection is not activated by
default but it's works fine now: I can execute any PHP script.

Now, I'm trying to access the functions and classes that are available
in the compiled pages, using the Quercus Java API [2]. The
documentation is not really helpful there and I don't find the
documentation explaining the whole architecture. I understand that the
main classes are QuercusContext, Env and QuercusPage, but I don't
understand the exact relations between them. For example, I never know
where I have to call init() and start(): I'm not sure about the
semantics of them, if they are needed or not and on which classes I'm
supposed to call them. I also see several getClass functions...

Here is what I have so far:

[[
class QuercusLike {
  val quercusContext = {
val context = new QuercusContext
context.init()
context.start()
context.setDatabase(null)
context
  }
  def update(name:String, value:String):Unit =
quercusContext.setIni(name, value)
  def execute(filename:File):Unit = {
val path:Path = quercusContext.getPwd.lookup(filename.getAbsolutePath)
val page:QuercusPage = quercusContext.parse(path)
val os:WriteStream = new WriteStream(StdoutStream.create)
os.setNewlineString("\n")
os.setEncoding("utf-8")
val env:Env = quercusContext.createEnv(page, os, null, null)
env.start()
env.execute()
env.close()
os.flush()
  }
}

class Test extends FunSuite {
  test("execute php script") {
val phpfile = new File("/home/betehess/php/test/index.php")
val quercus = new QuercusLike
quercus("include_path") = ".:/home/betehess/php/"
quercus.execute(phpfile)
  }
}
]]

My goal:
* compile a bunch of PHP files
* instantiating PHP objects from Java (these objects are defining in
the compiled files)
* calling the methods for these PHP objects

Alexandre Bertails, W3C Systems Team.

[1] 
http://wiki.caucho.com/Quercus:_Command_Line_Interface_%28CLI%29#Programmatically_executing_PHP_scripts_from_within_Java
[2] 
http://wiki.caucho.com/Quercus:_Command_Line_Interface_%28CLI%29#Returning_objects_example


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


Re: [Resin-interest] resin.exe server root directory in 4.0.10

2010-08-31 Thread Alex
> Mattias Jiderhamn wrote:
>> Trying to launch Resin 4.0.10 on Windows with the -server-root / 
>> -server_root / -root-directory / --root-directory but resin.exe seems to 
>> ignore all of them. Is there an undocumented change, or is there a bug 
>> in resin.exe in the 4.0.10 (pro) release?

That's a bug in resin.exe. You can work around it with root-directory attribute 
to > 
> 
> Do you see the same issue with java -jar lib/resin.jar start?
> 
> That's certainly a bug, although I'm not sure why that would be 
> different on windows.
> 
> -- 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] Custom startup recommendation

2010-08-31 Thread jkowall
I don't use the make install part of the makefile :)

-jk


On Tue, Aug 31, 2010 at 9:20 AM, Mattias Jiderhamn <
mj-li...@expertsystems.se> wrote:

>  How then are you supposed to go about upgrading Resin? Is there a
> parameter to the "configure" script to avoid creating/overwriting
> /etc/init.d/resin?
> If not, could such parameter be added...?
>
>  
>
> jkowall wrote (2010-08-31 14:45):
>
> On RHEL, it should be /etc/init.d/ for sure, and you manage the startup
> scripts with /sbin/sysconfig
>
> -jk
>
>
> On Tue, Aug 31, 2010 at 8:38 AM, Mattias Jiderhamn <
> mj-li...@expertsystems.se> wrote:
>
>> We are on RedHat Enterprise Linux 4/5.
>>
>> Note that the question is not the configuration itself, but *where* is the
>> proper place for such configuration. The file we use now is overwritten with
>> "the one which ships with Resin" on every Resin update.
>>
>>  
>>
>> jkowall wrote (2010-08-31 14:19):
>>
>> Depends on the version of Unix you are on exactly.  I customized the init
>> script quite a bit, so I don't use the one which ships with Resin.  Which
>> version/distribution are you using?  I can share the one I use if you'd
>> like.
>>
>> -jk
>>
>>
>> On Tue, Aug 31, 2010 at 4:10 AM, Mattias Jiderhamn <
>> mj-li...@expertsystems.se> wrote:
>>
>>> (I am not by far a *nix wizz, nor the admin of our production servers,
>>> so please bear with me)
>>>
>>> Historically we have edited the /etc/init.d/resin script to customize
>>> the Resin startup, such as setting the server root directory or
>>> assigning CPU cores with taskdef.
>>> In the 4.0.x branch this file is overwritten at each minor upgrade by
>>> "make install". Does this mean this is (no longer) the recommended way
>>> of configuring the startup, and there is some other means we should look
>>> at instead...?
>>>
>>> --
>>>
>>>   
>>
>>
>>
>
> ___
> 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