axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 10056] New: - EJBProvider requires "className" parameter
Date Thu, 20 Jun 2002 11:37:57 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10056>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10056

EJBProvider  requires "className" parameter

           Summary: EJBProvider  requires "className" parameter
           Product: Axis
           Version: current (nightly)
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Basic Architecture
        AssignedTo: gdaniels@macromedia.com
        ReportedBy: gdaniels@macromedia.com
                CC: axis-dev@xml.apache.org


>From the original (bug 7722):

In the deploy.wsdd, I have to explicitly specify the 'className' paramater. In 
the beta-1 release of Axis, the homeInterfaceName and beanJndiLocation were 
enough to get going. Although Axis can determine the class automatically by 
inspecting the (remote) class that is returned from the ejbHome.create(), it 
does not.

So either we document this behaviour (that 'className' is a required 
parameter), or we fix the code in WSDDService that requires this parameter:

WSDDService.java:
    /**
     * This method can be used for dynamic deployment using new WSDDService()
     * etc.  It validates some standard parameters for some standard providers
     * (if present).  Do this before deployment.deployService().
     */
    public void validateDescriptors()
    {
        String className = this.getParameter("className");
        if (className != null) {
            try {
                // Will this always be the right classloader?
                ClassLoader cl = Thread.currentThread().getContextClassLoader
();
                Class cls = cl.loadClass(className);
                desc.setImplClass(cls);
                initTMR();
                String encStyle = (desc.getStyle() == ServiceDesc.STYLE_RPC) ?
                    Constants.URI_CURRENT_SOAP_ENC : "";
                desc.setTypeMapping((TypeMapping)tmr.getTypeMapping(encStyle));
            } catch (Exception ex) {
            }
        }

I have two issues with this code:
1) Please don't use the contextClassLoader, this fails on some app-servers.
2) When using the EJB-Provider, the class has already been loaded using JNDI 
and ejbHome.create(). It should not be necessary to do a Class.forName().

Fixing WSDDService.java has my preference :-)

Mime
View raw message