You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Adam Brin <ab...@digitalantiquity.org> on 2016/06/09 23:04:59 UTC
interfaces with default methods on actions
I've been experimenting with Struts 2.5 and trying to simplify our Struts2
code by using Java8's new interface features with a series of default
methods with common getters/setters around pagination. But when I test it ,
the action's setter's aren't called.
According to this page (
https://struts.apache.org/docs/java-8-support-plugin.html) it seems like
the only supported java8 feature is:
-
Lambda Expressions in actions when using them with the Convention plugin
Are there plans to support other Java8 features in actions or has anyone
else tried using default methods with success?
thanks in advance,
adam
--
_________________________________________________________
Adam Brin
Director of Technology, Digital Antiquity
480.965.1278
Re: interfaces with default methods on actions
Posted by Lukasz Lenart <lu...@apache.org>.
2016-06-12 6:46 GMT+02:00 Johannes Geppert <jo...@gmail.com>:
> Is there still any reason to still use asm3?
> Or should we change this with 2.5.x?
>
> Best Regards
>
> Johannes
> Am 11.06.2016 11:28 vorm. schrieb "Lukasz Lenart" <lu...@apache.org>:
>
>> 2016-06-10 19:22 GMT+02:00 Adam Brin <ab...@digitalantiquity.org>:
>> > I’ll give it a try without the java8 plugin installed — but first I have
>> to figure out the dependency management issues around ASM, as struts2 seems
>> to still be dependent on both ASM 5x and ASM 3x (via XWork’s
>> DefaultClassFinder), and we’re getting startup errors.
>>
>> The Java 8 plugin is using ASM5, normally Struts still depends on ASM3
>>
>>
>> Regards
>> --
>> Łukasz
>> + 48 606 323 122 http://www.lenart.org.pl/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: interfaces with default methods on actions
Posted by Martin Gainty <mg...@hotmail.com>.
> From: abrin@digitalantiquity.org
> Date: Sun, 12 Jun 2016 06:40:03 -0700
> Subject: Re: interfaces with default methods on actions
> To: user@struts.apache.org
>
> It would be great if we could remove ASM3. My naive investigation suggests
> that both ASM 3 and ASM 5 share some of the same clases in the same package
> structure which are likely the cause of some of our issues. If it really is
> that one class, it shouldn't be to complex. Regarding Spring and ASM --
> spring repackages ASM under their own class path to avoid some of the
> compatibility change/issues:
>
> (historic)
> http://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/migration-3.2.html
> (current)
> http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/asm/package-summary.html
> MG>then struts spring plugin referencing spring-core version 3.2 *should* pull ASM5.0.1 inline?MG>then struts spring plugin referencing spring core version 4.x *must* pull ASM5.0.3 inline?
MG>appears that spring-plugin *can* implement spring 3.2 as long as we omit JSR-310 date-time, no parameter discovery via -parameters
MG>but spring-plugin may be forced to implement spring-core 4.0.3 as spring 3.2.x will be deprecated in 2016?MG>can you confirm spring-plugin needs to upgrade spring 3.2.x to spring-core 4.0.3 mid 2016?
MG>switching spring-frameworks for compile-time/runtime scenarios can of course be handled thru maven profiles (if we know a-priori)
MG>Thanks Adam
> Thanks!
>
> On Sun, Jun 12, 2016 at 5:42 AM, Martin Gainty <mg...@hotmail.com> wrote:
>
> >
> >
> >
> > > From: lukaszlenart@apache.org
> > > Date: Sun, 12 Jun 2016 11:31:26 +0200
> > > Subject: Re: interfaces with default methods on actions
> > > To: user@struts.apache.org
> > >
> > > 2016-06-12 6:46 GMT+02:00 Johannes Geppert <jo...@gmail.com>:
> > > > Is there still any reason to still use asm3?
> > > > Or should we change this with 2.5.x?
> > >
> > > Yes, we should drop ASM3 and the Java8 plugin as well and switch to ASM5.
> >
> > MG> with regards to spring plugin dependencies:
> > spring-beans,spring-core,spring-context,spring-webMG>for testing:
> > spring-testMG>which version of spring dependencies should we use to pull in
> > ASM5 transitive dependency?
> >
> > MG>is there a way to test struts spring plugin will work with ASM5 on
> > Java8 as well as Java7?
> > MG>Thanks Lukasz and Johannes
> > >
> > >
> > > Regards
> > > --
> > > Łukasz
> > > + 48 606 323 122 http://www.lenart.org.pl/
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> >
> >
>
>
>
> --
> _________________________________________________________
> Adam Brin
> Director of Technology, Digital Antiquity
> 480.965.1278
Re: interfaces with default methods on actions
Posted by Adam Brin <ab...@digitalantiquity.org>.
It would be great if we could remove ASM3. My naive investigation suggests
that both ASM 3 and ASM 5 share some of the same clases in the same package
structure which are likely the cause of some of our issues. If it really is
that one class, it shouldn't be to complex. Regarding Spring and ASM --
spring repackages ASM under their own class path to avoid some of the
compatibility change/issues:
(historic)
http://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/migration-3.2.html
(current)
http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/asm/package-summary.html
Thanks!
On Sun, Jun 12, 2016 at 5:42 AM, Martin Gainty <mg...@hotmail.com> wrote:
>
>
>
> > From: lukaszlenart@apache.org
> > Date: Sun, 12 Jun 2016 11:31:26 +0200
> > Subject: Re: interfaces with default methods on actions
> > To: user@struts.apache.org
> >
> > 2016-06-12 6:46 GMT+02:00 Johannes Geppert <jo...@gmail.com>:
> > > Is there still any reason to still use asm3?
> > > Or should we change this with 2.5.x?
> >
> > Yes, we should drop ASM3 and the Java8 plugin as well and switch to ASM5.
>
> MG> with regards to spring plugin dependencies:
> spring-beans,spring-core,spring-context,spring-webMG>for testing:
> spring-testMG>which version of spring dependencies should we use to pull in
> ASM5 transitive dependency?
>
> MG>is there a way to test struts spring plugin will work with ASM5 on
> Java8 as well as Java7?
> MG>Thanks Lukasz and Johannes
> >
> >
> > Regards
> > --
> > Łukasz
> > + 48 606 323 122 http://www.lenart.org.pl/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
>
>
--
_________________________________________________________
Adam Brin
Director of Technology, Digital Antiquity
480.965.1278
RE: interfaces with default methods on actions
Posted by Martin Gainty <mg...@hotmail.com>.
> From: lukaszlenart@apache.org
> Date: Sun, 12 Jun 2016 11:31:26 +0200
> Subject: Re: interfaces with default methods on actions
> To: user@struts.apache.org
>
> 2016-06-12 6:46 GMT+02:00 Johannes Geppert <jo...@gmail.com>:
> > Is there still any reason to still use asm3?
> > Or should we change this with 2.5.x?
>
> Yes, we should drop ASM3 and the Java8 plugin as well and switch to ASM5.
MG> with regards to spring plugin dependencies: spring-beans,spring-core,spring-context,spring-webMG>for testing: spring-testMG>which version of spring dependencies should we use to pull in ASM5 transitive dependency?
MG>is there a way to test struts spring plugin will work with ASM5 on Java8 as well as Java7?
MG>Thanks Lukasz and Johannes
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
Re: interfaces with default methods on actions
Posted by Lukasz Lenart <lu...@apache.org>.
2016-06-12 6:46 GMT+02:00 Johannes Geppert <jo...@gmail.com>:
> Is there still any reason to still use asm3?
> Or should we change this with 2.5.x?
Yes, we should drop ASM3 and the Java8 plugin as well and switch to ASM5.
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: interfaces with default methods on actions
Posted by Johannes Geppert <jo...@gmail.com>.
Is there still any reason to still use asm3?
Or should we change this with 2.5.x?
Best Regards
Johannes
Am 11.06.2016 11:28 vorm. schrieb "Lukasz Lenart" <lu...@apache.org>:
> 2016-06-10 19:22 GMT+02:00 Adam Brin <ab...@digitalantiquity.org>:
> > I’ll give it a try without the java8 plugin installed — but first I have
> to figure out the dependency management issues around ASM, as struts2 seems
> to still be dependent on both ASM 5x and ASM 3x (via XWork’s
> DefaultClassFinder), and we’re getting startup errors.
>
> The Java 8 plugin is using ASM5, normally Struts still depends on ASM3
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: interfaces with default methods on actions
Posted by Lukasz Lenart <lu...@apache.org>.
2016-06-10 19:22 GMT+02:00 Adam Brin <ab...@digitalantiquity.org>:
> I’ll give it a try without the java8 plugin installed — but first I have to figure out the dependency management issues around ASM, as struts2 seems to still be dependent on both ASM 5x and ASM 3x (via XWork’s DefaultClassFinder), and we’re getting startup errors.
The Java 8 plugin is using ASM5, normally Struts still depends on ASM3
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: interfaces with default methods on actions
Posted by Adam Brin <ab...@digitalantiquity.org>.
I’ll give it a try without the java8 plugin installed — but first I have to figure out the dependency management issues around ASM, as struts2 seems to still be dependent on both ASM 5x and ASM 3x (via XWork’s DefaultClassFinder), and we’re getting startup errors.
--
_________________________________________________________
Adam Brin
Director of Technology, Digital Antiquity
480.965.1278
> On Jun 9, 2016, at 11:42 PM, Lukasz Lenart <lu...@apache.org> wrote:
>
> 2016-06-10 1:04 GMT+02:00 Adam Brin <ab...@digitalantiquity.org>:
>> I've been experimenting with Struts 2.5 and trying to simplify our Struts2
>> code by using Java8's new interface features with a series of default
>> methods with common getters/setters around pagination. But when I test it ,
>> the action's setter's aren't called.
>>
>> According to this page (
>> https://struts.apache.org/docs/java-8-support-plugin.html) it seems like
>> the only supported java8 feature is:
>>
>> -
>>
>> Lambda Expressions in actions when using them with the Convention plugin
>>
>> Are there plans to support other Java8 features in actions or has anyone
>> else tried using default methods with success?
>
> It's a case with scanning classes to find actions. And the plugin
> should be dropped in Struts 2.5 ;-)
>
> Basically this was resolved in OGNL some time ago
> https://github.com/jkuhnert/ognl#release-notes---version-3012
>
> Can you prepare a small demo?
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: interfaces with default methods on actions
Posted by Lukasz Lenart <lu...@apache.org>.
2016-06-10 1:04 GMT+02:00 Adam Brin <ab...@digitalantiquity.org>:
> I've been experimenting with Struts 2.5 and trying to simplify our Struts2
> code by using Java8's new interface features with a series of default
> methods with common getters/setters around pagination. But when I test it ,
> the action's setter's aren't called.
>
> According to this page (
> https://struts.apache.org/docs/java-8-support-plugin.html) it seems like
> the only supported java8 feature is:
>
> -
>
> Lambda Expressions in actions when using them with the Convention plugin
>
> Are there plans to support other Java8 features in actions or has anyone
> else tried using default methods with success?
It's a case with scanning classes to find actions. And the plugin
should be dropped in Struts 2.5 ;-)
Basically this was resolved in OGNL some time ago
https://github.com/jkuhnert/ognl#release-notes---version-3012
Can you prepare a small demo?
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org