But I did not manage to specify in my properties the correct path to the 
log-file (FileAppender).
I develop the service on my local machine; later the service will run under a 
different system.
I use ant and I designed my build.xml that way, that I did not need to modify 
it - no matter where I want to deploy the service (local or productive).
The problem is the path of my log-Files. I do not want to specify
log4j.appender.A2.File = "C:/Programme/Tomcat/logs/service.log"

Because this may work on my local deployment but not sure on the production 
server.
So I thought to specify the whole path via the init() an the real path.

btw if I set:
log4j.appender.A2.File = "service.log"
the log-file is located:
a) under WINDOWS/system32 - if Tomcat runs as a service
b) under CATALINA_HOME/bin - if you use the Tomcat scripts to start/stop the 
server
Both are locations I don't like. 

I'm fully on your side, Martin; but as I said the init() is the only way I'm 
able to handle this.

Greetings

Bille
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> Gesendet: 05.06.06 14:35:04
> An: [email protected]
> Betreff: Re: [axis2] How to initialize settings on startup of the service


> 
> Initialising you app via init is one way to accomplish the objective -
> 
> But if your objective is to write enterprise level applications (governed by 
> ant build and deploy tasks)
> You will STILL need to initialise the settings
> 
> For this reason I recommend initializing using .properties
> 
> Viel Gluck
> Martin
> 
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official 
> business of Sender. This transmission is of a confidential nature and Sender 
> does not endorse distribution to any party other than intended recipient. 
> Sender does not necessarily endorse content contained within this 
> transmission.
> (mobile) 001-603-438-5053
> 
> 
> 
> 
> 
> >
> >Thanks Martin,
> >
> >setting up Log4J was not my problem - I got that to work.
> >My point was where do initialisation works concerning the service.
> >
> >Depaal cleared this. See previous mial in this thread.
> >
> >Thanks anyhow
> >
> >Bille
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: [email protected]
> > > Gesendet: 05.06.06 01:00:01
> > > An: <[email protected]>
> > > Betreff: Re: [axis2] How to initialize settings on startup of the 
> >service
> >
> >
> > > This is how to setup LOG4J in Tomcat
> > > log4j.properties
> > >
> > > log4j.logger.foo=ERROR, A0
> > > log4j.logger.deleted_log=INFO, A1
> > > log4j.appender.A0=org.apache.log4j.FileAppender
> > > log4j.appender.A0.File=D:\Program Files\Apache Software 
> >Foundation\Tomcat
> > > 5.0\logs\foo.log
> > > log4j.appender.A1=org.apache.log4j.FileAppender
> > > log4j.appender.A1.File=D:\Program Files\Apache Software 
> >Foundation\Tomcat
> > > 5.0\logs\deleted_log.log
> > > # Define appenders for your logging. These will show which messages to 
> >log.
> > > log4j.appender.A0.layout=org.apache.log4j.SimpleLayout
> > > log4j.appender.A1.layout=org.apache.log4j.SimpleLayout
> > > __________________________________________________________________
> > > web.xml
> > > <servlet>
> > > <servlet-name>setup</servlet-name>
> > > <servlet-class>SetupServlet</servlet-class>
> > >
> > > <init-param>
> > > <param-name>props</param-name>
> > > <param-value>D:\Program Files\Apache Software Foundation\Tomcat
> > > 5.0\webapps\logforj\WEB-INF\log4j.properties</param-value>
> > > </init-param>
> > >
> > > This email message and any files transmitted with it contain 
> >confidential
> > > information intended only for the person(s) to whom this email message 
> >is
> > > addressed.  If you have received this email message in error, please 
> >notify
> > > the sender immediately by telephone or email and destroy the original
> > > message without making a copy.  Thank you.
> > >
> > > ----- Original Message -----
> > > From: <[EMAIL PROTECTED]>
> > > To: <[email protected]>
> > > Sent: Sunday, June 04, 2006 6:04 PM
> > > Subject: [axis2] How to initialize settings on startup of the service
> > >
> > >
> > > > Hi to all,
> > > >
> > > > how do you initialize settings on startup?
> > > >
> > > > I'd like to set some configurations on the service start; e.g. setting 
> >the
> > > > path of log-file, which I have to do absolute. Therefore I need to 
> >access
> > > > the configurationContext to get the real path of the service location.
> > > > I put a static initializer in my service implementation; this is 
> >called on
> > > > startup. But AFAK at that time I have no possibility to access the
> > > > MessageContext, or any other context.
> > > > I tried o put an init(incomingMessageContext) in my service, but this
> > > > method never seems to be called. The "first" possibility to access the
> > > > context-hierarchie is the setOperationContext() which is called 
> >whenever a
> > > > service method is called.
> > > > At which point the init() is called?
> > > > I don't like to do the settings at any operation call.
> > > >
> > > > Could anyone clearify this please ?!
> > > >
> > > > Thanks to the community
> > > >
> > > > Bille
> > > >
> > > > ______________________________________________________________
> > > > Verschicken Sie romantische, coole und witzige Bilder per SMS!
> > > > Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> >_____________________________________________________________________
> >Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> >http://smartsurfer.web.de/?mc=100071&distributionid=000000000071
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to