axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsha Thirimanna <>
Subject [AXIS2] Most Perfectly When and Where we should load XSD Schema in WebService
Date Mon, 18 Jun 2012 10:07:52 GMT

Most Perfectly When and Where we should load XSD Schema in WebService.
Our XSD's are available in aar file so , we want to avoid load everytime
xsd when request coming.
We maintain the
private static ConcurrentHashMap<String,Schema> map = new

private static Schema loadXSD(String xsd ){
        Schema schema =null;

        try {
            URL url = new URL(ServiceConfig.getServerURL()+ xsd);
            schema = factory.newSchema(url);
            map.put(xsd, schema);
        } catch (Exception e) {
        return schema;

public static Schema loadSchema(String xsd){
        Schema schema = map.get(xsd);
        return schema;

When request coming we can load Schema using this and reuse loaded one.
But finally because of the synchronization problem, we thought to load all
XSD atonce in ContextListner in the AXIS2 Web. But when it execute , aar is
not deployed. So how we do this.


View raw message