Re: PrOperTies ??

2001-08-22 Thread Eddie Post
Title: SV: Roll-BACK question.



Noc noc,

Can someone please still have some advice on the 
question I posted below ??


Eddie

  - Original Message - 
  From: 
  Eddie 
  Post 
  To: Orion-Interest 
  Sent: Tuesday, August 14, 2001 9:18 
  AM
  Subject: PrOperTies ??
  
  Hellu,
  
  Where do you define your properties/constants 
  which you want to use in your ejb's and servlets (I am using CMP) 
  ??
  
  I am wandering if, putting it all in a property 
  file is the best way to do it (the EJB spec don't 'allow' it), concerning 
  performance and the xml files to store properties. Howcan you define 
  constants in a xml file that are both seen by the servlets and ejb's 
  ??
  
  Some advice on this issue please ?
  
  Eddie


RE: PrOperTies ??

2001-08-22 Thread Juan Lorandi (Chile)
Title: SV: Roll-BACK question.



env 
entries in the ejb-jar.xml, web.xml;
also, 
you could create a "load-on-startup" servlet, which is allowed to access disk, 
to create, say, a singleton
which 
in its constructor opens and loads the properties files. Therefore, you will be 
paying once per JVM for the initialization, and have it your 
way.

HTH
Juan 
Pablo

  -Original Message-From: Eddie Post 
  [mailto:[EMAIL PROTECTED]]Sent: MiƩrcoles, 22 de Agosto de 
  2001 6:32To: Orion-InterestSubject: Re: PrOperTies 
  ??
  Noc noc,
  
  Can someone please still have some advice on the 
  question I posted below ??
  
  
  Eddie
  
- Original Message - 
From: 
Eddie 
Post 
To: Orion-Interest 
Sent: Tuesday, August 14, 2001 9:18 
AM
Subject: PrOperTies ??

Hellu,

Where do you define your properties/constants 
which you want to use in your ejb's and servlets (I am using CMP) 
??

I am wandering if, putting it all in a property 
file is the best way to do it (the EJB spec don't 'allow' it), concerning 
performance and the xml files to store properties. Howcan you define 
constants in a xml file that are both seen by the servlets and ejb's 
??

Some advice on this issue please ?

Eddie


Re: PrOperTies ??

2001-08-22 Thread Eddie Post
Title: SV: Roll-BACK question.



Thanks Juan, I like the load-on-startup alternative 
and will play around with it.

Ed

  - Original Message - 
  From: 
  Juan 
  Lorandi (Chile) 
  To: Orion-Interest 
  Sent: Wednesday, August 22, 2001 5:14 
  PM
  Subject: RE: PrOperTies ??
  
  env 
  entries in the ejb-jar.xml, web.xml;
  also, you could create a "load-on-startup" servlet, 
  which is allowed to access disk, to create, say, a 
  singleton
  which in its constructor opens and loads the 
  properties files. Therefore, you will be paying once per JVM for the 
  initialization, and have it your way.
  
  HTH
  Juan 
  Pablo
  
-Original Message-From: Eddie Post 
[mailto:[EMAIL PROTECTED]]Sent: MiƩrcoles, 22 de Agosto de 
2001 6:32To: Orion-InterestSubject: Re: PrOperTies 
??
Noc noc,

Can someone please still have some advice on 
the question I posted below ??


Eddie

  - Original Message - 
  From: 
  Eddie 
  Post 
  To: Orion-Interest 
  Sent: Tuesday, August 14, 2001 9:18 
  AM
  Subject: PrOperTies ??
  
  Hellu,
  
  Where do you define your properties/constants 
  which you want to use in your ejb's and servlets (I am using CMP) 
  ??
  
  I am wandering if, putting it all in a 
  property file is the best way to do it (the EJB spec don't 'allow' it), 
  concerning performance and the xml files to store properties. Howcan 
  you define constants in a xml file that are both seen by the servlets and 
  ejb's ??
  
  Some advice on this issue please 
  ?
  
  Eddie


Re: Properties survice auto-deploy

2001-07-16 Thread Johan Fredriksson



I would really hate the fact if 
orion/applications/myapp was swiped on the next deployment, since my htdocs are 
mounted under that directory. And we have customers who uses fileupload for 
images that are to be displayed. And if the directory is to be swiped everytime 
we update the application, all images would be lost every time and we would have 
to move the images to the database instead, which is slower.

Johan

  - Original Message - 
  From: 
  Bill 
  Winspur 
  To: Orion-Interest 
  Sent: Monday, July 09, 2001 12:35 
AM
  Subject: Properties survice 
  auto-deploy
  
  I use a frontservlet.properties file in 
  my web-inf directory which is pickedup by my front servlet (naturally). 
  While testing the servlet, I renamed thefile to backServlet.properties, 
  just to exercise the diagnostic code. To mygreat surprise it made not 
  difference: the servlet continued to find a filecalled 
  frontservlet.properties.Digging deeper revealed that both 
  frontServlet.properties andbackServlet.properties were present in 
  orion/applications/myapp. It seemsthat when I auto-deployed my myapp.ear 
  into applications/, the orignal file,frontservlet.properties was not 
  replaced, and the new filebackservlet.properties was added alongside 
  it.I deleted the old file to get my test over with, but does anybody 
  know whyauto-deploy of myapp.ear does not discard everythng that was 
  inorion/applications/myapp ?TIA 
Bill.


Re: properties files and JSP's

2001-05-02 Thread Sarathy Mattaparti

default orion home directory.  for example if you installed it on windows OS 
on your drive d:\orion.. It'll look under d:\orion unless u specify any path 
in jsp.


where does Orion look for the properties file for JSPs that
use them.



_
Get your FREE download of MSN Explorer at http://explorer.msn.com





Re: Properties

2000-11-11 Thread Magnus Naeslund\(b\)

From: "Russ White" [EMAIL PROTECTED]
 try putting your jar files in /web-inf/lib
 you may have to create the directory.
 
 beer would be nice.
 hope that helps.
 

I've added stuff like:
library path='/home/site/java/jars/mail.jar'/
library path='/home/site/java/classes'/

Shouldn't that do?
Or is /WEB-INF special?

Magnus

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Programmer/Networker [|] Magnus Naeslund
 PGP Key: http://www.genline.nu/mag_pgp.txt
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-







Re: Properties

2000-11-11 Thread Magnus Naeslund\(b\)

From: "Jason Smith" [EMAIL PROTECTED]
 I am assuming you are talking about a java.util.Property file here.  If
the
 class that wants to access the property file is bundled within a jar, you
 should try using the Class.getResource(String name) method.  Just remember
 if you put the properties in the root of the jar you need to specify the
 name you pass into getResource as "/whatever.properties".

 Sun has an article entitled "Accessing Resources in a Location-Independent
 Manner" you might want to check out.
 http://java.sun.com/j2se/1.3/docs/guide/resources/resources.html

 jason


Thanks, but part of the problem is that it is a closed source jar package i
am dealing with here.
And it's not nice to be forced to add that properties file to the jar file
everytime i need to change it..
I'll read the spec.

Magnus

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Programmer/Networker [|] Magnus Naeslund
 PGP Key: http://www.genline.nu/mag_pgp.txt
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-






Re: Properties

2000-11-11 Thread Sven van 't Veer



"Magnus Naeslund(b)" wrote:
 
 
 Shouldn't that do?
 Or is /WEB-INF special?
 
According to specs WEB-INF/classes is where your (non-jarred) classes
should go and WEB-INF/lib is where you should put your .jar files (e.i.
your mail.jar). I suppose your jar should work if you put it in
/WEB-INF/lib and place the properties file there as well.

Take a look on /orion/doc/application-howto.html (might be
application-creation-howto.html)

sven

-- 
==
Sven E. van 't Veer  
http://www.cachoeiro.net
Java Developer  [EMAIL PROTECTED]
==




RE: Properties

2000-11-11 Thread Russ White

It depends on were you added it.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Magnus
Naeslund(b)
Sent: Saturday, November 11, 2000 3:03 AM
To: Orion-Interest
Subject: Re: Properties


From: "Russ White" [EMAIL PROTECTED]
 try putting your jar files in /web-inf/lib
 you may have to create the directory.
 
 beer would be nice.
 hope that helps.
 

I've added stuff like:
library path='/home/site/java/jars/mail.jar'/
library path='/home/site/java/classes'/

Shouldn't that do?
Or is /WEB-INF special?

Magnus

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Programmer/Networker [|] Magnus Naeslund
 PGP Key: http://www.genline.nu/mag_pgp.txt
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-









Re: Properties

2000-11-11 Thread Magnus Naeslund\(b\)

From: "Sven van 't Veer" [EMAIL PROTECTED]


 "Magnus Naeslund(b)" wrote:
 
 
  Shouldn't that do?
  Or is /WEB-INF special?
 
 According to specs WEB-INF/classes is where your (non-jarred) classes
 should go and WEB-INF/lib is where you should put your .jar files (e.i.
 your mail.jar). I suppose your jar should work if you put it in
 /WEB-INF/lib and place the properties file there as well.

 Take a look on /orion/doc/application-howto.html (might be
 application-creation-howto.html)

 sven


So i thought aswell, but it still doesn't work.
I wonder if the jar package really is using the properties interface, or
something homemade...

Magnus

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Programmer/Networker [|] Magnus Naeslund
 PGP Key: http://www.genline.nu/mag_pgp.txt
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-







Re: Properties

2000-11-11 Thread Magnus Naeslund\(b\)


- Original Message - 
From: "Russ White" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Saturday, November 11, 2000 12:07
Subject: RE: Properties


 It depends on were you added it.
 

In application.xml.
It works.
It loads classes from the .jar, but i just can't get it to read properties.

Magnus

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Programmer/Networker [|] Magnus Naeslund
 PGP Key: http://www.genline.nu/mag_pgp.txt
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-







Re: Properties

2000-11-11 Thread Magnus Naeslund\(b\)

Hmm.
I've decompiled  a some of the jar package's classes.
It uses java.lang.ClassLoader.getSystemResourceAsStream() to read the file.
Is that wrong, or does that mean i should put my properties file in another
location or something?
Darn.

Magnus

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Programmer/Networker [|] Magnus Naeslund
 PGP Key: http://www.genline.nu/mag_pgp.txt
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-






RE: Properties

2000-11-10 Thread Jason Smith

I am assuming you are talking about a java.util.Property file here.  If the
class that wants to access the property file is bundled within a jar, you
should try using the Class.getResource(String name) method.  Just remember
if you put the properties in the root of the jar you need to specify the
name you pass into getResource as "/whatever.properties".

Sun has an article entitled "Accessing Resources in a Location-Independent
Manner" you might want to check out.
http://java.sun.com/j2se/1.3/docs/guide/resources/resources.html

jason