OpenEjb create Map<String, Map<Long, String>> resource for @Resource

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenEjb create Map<String, Map<Long, String>> resource for @Resource

michaelmgsy
How to creating the Map<String, Map<Long, String>> resource for @Resource in openEjb?


Thank you!
Reply | Threaded
Open this post in threaded view
|

Re: OpenEjb create Map<String, Map<Long, String>> resource for @Resource

dblevins
Administrator

On Oct 22, 2010, at 6:09 PM, michaelmgsy wrote:

>
> How to creating the Map<String, Map<Long, String>> resource for @Resource in
> openEjb?

See http://openejb.979440.n4.nabble.com/Please-Help-me-td2999052.html#a2999052

Reply | Threaded
Open this post in threaded view
|

Re: OpenEjb create Map<String, Map<Long, String>> resource for @Resource

michaelmgsy
I look up the source code.
For Map<String, Map<Long, String>> type resource.
In line 363 of PropertyEditors.class, why the parameters type of map only must be Class?
The getTypeParameters method can found parameters type array. the array can be used for  Map<String, Map<Long, String>> type resource.

This is source can be modified.
Reply | Threaded
Open this post in threaded view
|

Re: OpenEjb create Map<String, Map<Long, String>> resource for @Resource

dblevins
Administrator

On Oct 22, 2010, at 10:40 PM, michaelmgsy wrote:

>
> I look up the source code.
> For Map<String, Map<Long, String>> type resource.
> In line 363 of PropertyEditors.class, why the parameters type of map only
> must be Class?

My guess is that the Class check is there simply because the code isn't setup to handle nested generic types -- probably requires a little recursion in building the converters.  It would be a welcome addition if you wanted to take a stab at it.

> The getTypeParameters method can found parameters type array. the array can
> be used for  Map<String, Map<Long, String>> type resource.
>
> This is source can be modified.

Right, you can change anything you like.  If you get something working, attach it here and we can try and get it in on the xbean side:

  https://issues.apache.org/jira/browse/XBEAN

-David