I know this is a little OT, but had you thought about doing it with xdoclet? Particularly if the Hibernate configurations are coming out of xdoclet in the first place (and everything's set at compile time), you could probably extend the Hibernate templates pretty easily to generate the action mappings automatically. Then you'd have everything based on Hibernate, done dynamically, and a faster startup time as well.

Just an idea.

Kirk Wylie
M7 Corporation

Ahmet ISIK wrote:
I'm doing it in a plugin.
My purpose is to develop generic CRUD operations, views and forms for
any model object that is persisted using Hibernate. For this, I
introspect Hibernate config and provide form fields according to
underlying object's properties.
I'm declaring actionmappings at runtime because I'm asking Hibernate for
a list of entities that are declared.

Martin Cooper wrote:
> "Ahmet ISIK" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>>thanks Martin,
>>I have found a solution. I have acquired module config by
>>Globals.MODULE_KEY key from app context. Then I added programmatically
>>configured ActionMappings to module config object. after that it is
>>possible to use those action mappings. Is this a bad practice?
>
>
> Where are you doing this? (And why?)
>
> If you're doing it in a plug-in, then I believe it will work, but I don't
> see how that would be any more "dynamic" than adding them to your Struts
> config file. (Also in that case, you are already passed the module config,
> so you wouldn't need to look it up, as you mentioned you are doing.)
>
> If you're doing it outside of a plug-in, then I'm puzzled. Once Struts loads
> the config, it freezes it and throws IllegalStateException if you attempt to
> modify it.
>
> --
> Martin Cooper
>
>
>
>>Martin Cooper wrote:
>>
>>>"Ahmet ISIK" <[EMAIL PROTECTED]> wrote in message
>>>news:[EMAIL PROTECTED]
>>>
>>>
>>>>Hi,
>>>>Is it possible to declare struts action mappings at runtime, and how?
>>>
>>>
>>>No, it's not possible. The config is read in at application startup and
>
> is
>
>>>then frozen. (The reason it's done this way is so that access to the
>
> config
>
>>>does not need to be synchronised once the app is up and running, thus
>>>leading to much improved overall performance.)
>>>
>>>--
>>>Martin Cooper
>>>
>>>
>>>
>>>
>>>>Thanks in advance
>>>>
>>>>--
>>>>Ahmet ISIK
>>>>Ideal Teknoloji Bilisim Çözümleri A.S.- Iliskisel Is Kanali
>>>>Yazilim Muhendisi
>>>>http://www.idealteknoloji.com
>>>
>>>
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>>--
>>Ahmet ISIK
>>Ideal Teknoloji Bilisim Çözümleri A.S.- Iliskisel Is Kanali
>>Yazilim Muhendisi
>>[EMAIL PROTECTED]
>>http://www.idealteknoloji.com
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- Ahmet ISIK Ideal Teknoloji Bilisim Çözümleri A.S.- Iliskisel Is Kanali Yazilim Muhendisi [EMAIL PROTECTED] http://www.idealteknoloji.com


--------------------------------------------------------------------- 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]



Reply via email to