I am trying to create a web application in order to fetch results from uCMDB and display them (I know that uCMDB browser does the same but I want a personal implementation of this). The application is running on Oracle Weblogic Server. I have an EJB calling a class which has a simple method quering uCMDB. In this class I am trying to connect to uCMDB in the following way (as I have seen in many examples in the web):
UcmdbServiceProvider provider = UcmdbServiceFactory.getServiceProvider(HOSTNAME, PORT);
Credentials credentials = provider.createCredentials(USERNAME, PASSWORD);
UcmdbService ucmdbService = provider.connect(credentials, provider.createClientContext("getTenants"));
My problem is that at this point (provider.connect - I have logging to see the steps of execution) it takes very long time to connect and continue. After it connects it fetches the results quickly. I have tested the same code in a single standalone Java class and it works really fast.
So my question is, why does it take so much time to connect in my case with Weblogic and EJB calling this code?
I would really appreciate any help/hint on this.
Thank you in advance.