How to check Documentum Service is UP or NOT
Hi,
We have an specific requirement in which we have to test whether the documentum repository services is up or down before getting the IDfSession. Is the following code is correct ?
testSess = sessMgr.newSession(docBaseName);
if (testSess.isConnected())
{
System.out.println("Service is UP please proceed...");
//Get the session
}
else
System.out.println("Service id DOWN...");
Can you guys help me on this.
Regards,
Raj
Comments
-
Hi,
is it possible to get a session if the target repository is down?
I think you will not be able to construct a session if the target repository is down.
Also think of this scenario, lets say you have configured several services against a single repository.If one of them is down and another is up, you will get a session but actually one service is down.
0 -
Q: is it possible to get a session if the target repository is down?
A: Of course not since you must log in to get a session
Actually, the code seems correct. The thing is that if you don't get the session doesn't necesseraly mean that the service is down. It can also mean that the user informations are incorrect so you'll have to double check the error returned
0 -
Q: is it possible to get a session if the target repository is down?
YES, See Monitoring scripts section of High-Availability Support Scripts in manual, EMC Documentum Content Server Administration and Configuration 6.7 Guide
These scripts will ensure that the basic content server services are running. Depending on your environment setup, there are multiple failure points between an up an running repository and getting a valid session.
- As Francois has already said, there could be issues with your test user account, i.e. user account not exists, login disabled or password is wrong,
- Docbrokers could be down, if using remote docbrokers next to client aps (app servers)
- firewalls could be up and blocking
0 -
Hi,
In my opinion you should improve your code.
If the docbase is up this part will run and print "Service is UP please proceed...".
testSess = sessMgr.newSession(docBaseName);
if (testSess.isConnected()) { System.out.println("Service is UP please proceed..."); //Get the session }But I guess you will never see something like that "Service id DOWN..." if the service is down. Because if the service is up the if block will run, else if the service is down your program will throw an exception and none of the if else block will run.
else System.out.println("Service id DOWN...");
You would better to something like that.
try{ testSess = sessMgr.newSession(docBaseName);
if (testSess.isConnected()) { System.out.println("Service is UP please proceed..."); //Get the session } }catch(Throwable e){ if( e instanceof DfException )
{ System.out.println( "DFC Exception:"+e ); }else {
System.out.println( "Non-DFC Exception" +e);
}}0 -
You could also query the Docbroker for a Docbase map to determine if a specific Docbase is running. That wa,y you could avoid an exception if it is down and throw a nice error as Imran alluded to. I don't have an example of the DFC code handy but I'm sure you can figure it out easily enough. For an antiquated example of this, see the dmqdocbroker.awk script in the server's /bin directory. I wrote a series of blog posts about this utility if you are intersted: https://msroth.wordpress.com/2010/06/06/documentum-connection-utilities/.
0 -
Hi Brain,
I understand the following command line will bring the status of the content server, since an java file is available in server-impl.jar
java ContentServerStatus -docbase_name repository_name -user_name user_name
However, we are using an webservices, and this webservices is responsible for injecting documents into the repository. So to prior that operation we need to check the status of the content server.
Is there any DFC code equivelent to the above java command line ? to check the status of the content server?.
Your help is really appreciated.
Regards,
Raj
0 -
can not be bothered answering right now as pevved that you did not mention web services up to now
0 -
Either you are using web services remotely in which case DFC is of no more help than the command line - or you are looking to write you own web service operation to check the status of the content server, in which case all the previous advice about using the docbroker, testing your sessions applies. SO the question is already answered is it not?
0 -
Brian, I like that you have now been transmogrified from LastNitesCurry into THE BRAIN ;-)
screen name is still lastnitescurry on my profile... looks like a ^^feature^^ to display real name not screen name!!
0 -
Hi Guys,
I apologize for the delayed reponse,
Let me add some more information to my orginal question,
We are having an webservices and it will do the following steps,
1. Get the content data and meta information from external source
2. Get the session with documentum repository
3. Using DFC api's it inject the content and meta information into the repository
So, here between Step 1 and Step 2 we need to test the status of the repository whether it is up or down ? we need this information for Monitoring purpose,
Is there any DFC api available to check the repository up or down ?
Your help is really appreciated.
Regards,
Raj
0 -
Hi
As Scott suggested, you can query the docbasemap to getthe list of running repository from the docbroker and if you get your target docbase in the list, then its running.
IDfClientX clientx = new DfClientX();
IDfClient client;
try
{
client = clientx.getLocalClient();
IDfDocbaseMap myMap = client.getDocbaseMap();
for(int i = 0; i < myMap.getDocbaseCount(); i++)
{
System.out.println(myMap.getDocbaseName(i));
}
}
catch (DfException e1)
{
e1.printStackTrace();
}Check your target repository inside the loop.
Regards,
Muthu
0 -
How can i check all the services are running or not using DFC like Rendition service,Docbroker,CTS,Xplore etc.
0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 102 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 124 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax