cancel
Showing results for 
Search instead for 
Did you mean: 

How can you change property files of a EJB at Runtime?

Former Member
0 Kudos

Hi,

I have got an ejb and want to change my variables which I stored in property file at Runtime.

But the property file isn´t in the jar-file of my ejb...

How can I add it.

Or How can I change the property file without new compilation.

Thanks

Uli

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Uli,

the previous post is generally correct, but without taking any part in the sensibility of this (there are valid reasons why you would not store the values in a DB) it would be necessary for you to be a bit more specific.

Is your problem that you can not see the file from your EJB or that you don't know how to change a property file entry in general?

Cheers,

Kalle

Former Member
0 Kudos

HI Kalle,

I want to change an entry in a property file at runtime, so that I don´t have to recompile my project.

The Ejb creates always a .jar File but in this jar file I cannot find my property file.

Can you tell how I can manage this?

Thanks

Uli

Former Member
0 Kudos

HI,

the background is that we want to have more languages in our project.

Or is another way better to do this?

Thanks

Uli

Benny
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Uli,

I'd say bad idea: If you ever run your ejb's in a cluster how do you want to distribute the changes to all instances? Well, you could write to a shared disk, but this makes things not very much easier.

Better you keep such stuff in a database table.

Regards,

Benny