dev@glassfish.java.net

Re: About the IIOP access when appclient starting

From: Zhang Biyun <zhangby_at_cn.fujitsu.com>
Date: Fri, 03 Apr 2009 10:32:49 +0800

Hi Tim,

Thanks for paying attention to this.

From the view of the AppContainer source, services(e.g. naming service)
were intialized before the app client accesses resources on the
back-end, whether the app client have annotations or not. Right?

---------------
   /**
     * Creates the InitialContext, initializes the ORB's transaction
service,
     * and creates and establishes the switch's transaction manager.
     * @param iiopProperties Properties object used in creating the
InitialContext
     * @return the InitialContext created
     * @throws NamingException for errors creating the InitialContext
     */
    public static InitialContext initializeNaming(Properties
iiopProperties) throws NamingException {
        InitialContext result = new InitialContext(iiopProperties);
            :
    }
---------------

Besides, the following situation is possible. It is that a client
accesses web service using HTTP/HTTPS other than IIOP, and the client
is executed by ACC, and the initialization of naming service is not
necessary. Right?

Is it the specification of ACC that the access of app client must use
the protocol of IIOP? If so, the IIOP access is generated even when it
accesses a web service by HTTP/HTTPS, and it is not possible to
communicate by exceeding client request.

Best Regards,
Zhang Biyun

Tim Quinn さんは書きました:
> Does your app client have annotations to access back-end services?
>
> - Tim
>
> Zhang Biyun wrote:
>> Hello Tim,
>>
>> I have some questions about IIOP connection when executing a appclient
>> in Applicaiton Client Container.
>>
>> When the appclient commmand starting, it seems that it goes to get
>> a connection through the iiop port of the server instance without fail
>> for the applicaiton program that seems not to need connection to
>> service, especially naming sevice. Does it understand what necessity for
>> you to exist? If so, could you tell me what necessity is?
>>
>> Moreover, could you change like no "without fail" and doing the iiop
>> connection if necessary?
>> The current state and this operation are thought that it is undesirable.
>> The IIOP access is generated even when it accesses cluster with
>> WebService, and it is not possible to communicate exceeding Proxy under
>> the present situation.
>>
>> # It seems that InitialContext was generated in main processing
>> # (com.sun.enterprise.appclient.Main) of the client container at
>> # preInvoke(★1).
>>
>> ------------------------------------
>> public class Main {
>>
>> public Main(String[] args){
>>
>> :
>>
>> String appMainClass = container.preInvoke(props); →★1
>> cleanup.setAppContainer(container);
>>
>> :
>> }
>>
>> }
>>
>> public class AppContainer
>> {
>>
>> :
>>
>> /**
>> * This is called by main before the actual main of the application
>> * is invoked. It initializes the container and performs login for
>> * the user.
>> * @return the main class of the application.
>> */
>> (★1) public String preInvoke(Properties props) throws Exception {
>> return preInvoke(initializeNaming(props) ,
>> Thread.currentThread().getContextClassLoader());
>> }
>>
>> :
>> }
>>
>> }
>> ------------------------------------
>>
>> Thanks,
>> Zhang Biyun
>>
>>
>>
>
>
>
>