Re: declaring action mappings at runtime

2003-10-31 Thread Ahmet ISIK
Kirk, thanks for the advice,
yes, you're right I think. I'm going to change it that way in the first 
refactoring time available.

Kirk Wylie wrote:
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 zmleri 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 zmleri 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 zmleri 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]



--
Ahmet ISIK
Ideal Teknoloji Bilisim zmleri 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]


Re: declaring action mappings at runtime

2003-10-30 Thread Ahmet ISIK
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 zmleri 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 zmleri 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 zmleri 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]


Re: declaring action mappings at runtime

2003-10-30 Thread Craig R. McClanahan
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.

Modifying the configuration information in a PlugIn is specifically 
allowed, for precisely this kind of purpose.  It is safe, because 
plugins are called from the init() method of ActionServlet, and must all 
complete successfully before the first request is processed.

Struts freezes the configuration information *after* the plugins have 
been initialized; from that point on, you'll get IllegalStateExceptions 
if you try to modify existing XxxConfig beans in any way.

Craig


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


Re: declaring action mappings at runtime

2003-10-30 Thread Kirk Wylie
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 zmleri 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 zmleri 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 zmleri 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]


Re: declaring action mappings at runtime

2003-10-29 Thread Martin Cooper

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]



Re: declaring action mappings at runtime

2003-10-29 Thread Ahmet ISIK
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?

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


RE: declaring action mappings at runtime

2003-10-29 Thread Zhang, Larry (L.)
If you want to find out which will be next page to go, you can create an ActionForward 
object and customize the parameter. 

-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 3:35 PM
To: [EMAIL PROTECTED]
Subject: Re: declaring action mappings at runtime



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]

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



Re: declaring action mappings at runtime

2003-10-29 Thread Martin Cooper

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]