在appengine初始化时禁用TLD扫描 [英] Disable TLD scanning at appengine initialization

查看:326
本文介绍了在appengine初始化时禁用TLD扫描的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此线程类似于:。



这并不美丽,但是将所有JAR命名为例如 jetty - (...)。jar 应该防止他们被扫描为TLD。 或者,重新包装所有JAR放入一个大的JAR中,并给出AppEngine的 NoTLDJarPattern 所涵盖的名称。


This thread is similar to: Disable taglib scanning in google app engine (Jetty)

The author of that thread accepted a wrong answer.

We were trying to reduce the appengine startup time of my instances I've come accross the taglib TLD classpath scanning.

My application has 50mb of jars. The scanning of the tld takes 20% of the startup time:

(Image from Yourkit capture of the startup time). You can also set logger.properties level to ALL and you will see the classpath scanning issue going on.

Is there a way to disable that on appengine? God forbid us to have anything to do with taglibs, JSP, or anything like that! We have a very slick velocity + spring-mvc container.

Again, the issue is very clear: appengine doesn't respect "org.mortbay.jetty.webapp.NoTLDJarPattern" configuration in web.xml

This thing is killing our service! Our boot time is going over 60 seconds and we need to do anything to reduce that.

解决方案

Posting my comment from above as answer:

Rename your JARs to match the NoTLDJarPattern used by AppEngine's webdefault.xml.

It's not pretty, but naming all your JARs e.g. jetty-(...).jar should prevent them from being scanned for TLDs.

Alternatively, repackage all JARs into one big JAR and just give that a name covered by AppEngine's NoTLDJarPattern.

这篇关于在appengine初始化时禁用TLD扫描的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆