-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Xavier,
On 8/29/13 3:06 AM, Xavier Dury wrote:
> Could it be possible for the tomcat team to include a
> javax.naming.spi.ObjectFactory which would use EL3.0 expressions?
>
> It would be great if you want to have resource-ref which are not of
> the usual types.
>
> I always wanted to have an ObjectFactory for URLs but having one
> for each type is too much work... so now, that we have a more
> powerful EL engine, maybe it would a great opportunity to use it.
>
> <Resource name="/url/SomeService" type="java.net.URL"
> factory="org.apache.tomcat.jndi.ELObjectFactory"
> importClass="java.net.URI"
> expression="URI('http://some.service.url').toURL()" />
>
> <Resource name="/cache/CacheManager"
> type="net.sf.ehcache.CacheManager"
> factory="org.apache.tomcat.jndi.ELObjectFactory"
> importClass="net.sf.ehcache.CacheManager,java.net.URI"
> importStatic="net.sf.ehcache.CacheManager.newInstance"
> expression="CacheManager.newInstance(URI('file:${catalina.base}/conf/ehcache.xml').toURL())"
What's
>
wrong with just using $catalina.base within your context.xml?
It will expand appropriately already... no EL needed.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBCAAGBQJSH5irAAoJEBzwKT+lPKRYRoYP/03+hC07yLehUBQHuaIghRTB
6NWcWrzcZ3bCy/uFtQDLH12am7sbE2zQ+VO6HPlOJaRJul8UQLCdZlTXmQuquz+G
8SGoGb4BWqPcluMrhbO+8v7f4aMPN7NenxBRpzNvWlQPtOo2h7+9cmz2bwh+XikU
5J8IGE2e7wb8dAQBu6DJtFsQi+fAhOGaiLfBtorwDLYrpJ4nN0tr28LSFrX9VKtD
d0Fwga1zzHrBiGFzNAoUUujuGaPYCfbGugNJogWQO0dvHKQMmAM9GGLStnJbyy4U
vehGGU4lRq6mhkD0KCUJ/zVxM1fuFxK+Q4hRah97Mw7r8jHgqyQEqdfGV9EjUZh4
GVg0Y5W308ZTZfiutb7N++GTFrYq9qohHmI8pQyJ2jQLPtIo7gZv9KKBgFHUggpM
2lg4ZL6/3wjALScRsQ5/NKUpg4s0NIb25LPOKViCW1fHF2euUcEH/lkkelgGMgFP
2BXVszGOhQghePXFg6hkpAa4zhF0HRJQj8T5a1kJIBnf4QW3mm/g2Xv19EVNyiOs
ZrkC6dSXZXnJZ0aYxusxRNKvSplTGm6ywuftxy17H89Mblib8qb0G+5MNwRJwceF
tOkvHoMEY20dbhRZpQDL79a5dVL7YLc4M8hXBR1JQkmo1RyslHU/Y/+782OSs5+w
ZFM1iRO6JYbxLrGdwQ3n
=9lxu
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]