Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Stardust/Knowledge Base/API/ExamplesofAPIUsage/Initialization"

Line 12: Line 12:
 
But there are also others like the DocumentService for special purposes. All these services are used in the same way: They need to be initialized in order to work with them.
 
But there are also others like the DocumentService for special purposes. All these services are used in the same way: They need to be initialized in order to work with them.
  
==== Solution ====
+
==== Solution ====
  
Working with the services is quite easy. Getting the service instances itself requires some setup. The initialization itself is done for you by Stardust.
+
Working with the services is quite easy. Getting the service instances itself requires some setup. The initialization itself is done for you by Stardust.  
  
'''Requirements'''<br>
+
'''Requirements'''<br>  
  
 
Your client's carnot.properties has to be set up correctly. If you use the Stardust in EJB-mode you need another carnot.properties as if stardust is deployed in Spring mode. But this is another carnot.properties as your server (Stardust itself) uses.  
 
Your client's carnot.properties has to be set up correctly. If you use the Stardust in EJB-mode you need another carnot.properties as if stardust is deployed in Spring mode. But this is another carnot.properties as your server (Stardust itself) uses.  
  
'''Client vs. Server'''<br>IPP (exactly the carnot-engine) is the server. It (among others) creates the service objects we will use later. Its carnot.properties will be deployed in the Application Server/Container below WEB-INF/classes (or simmilar).<br>The client (the program you will write which will use the IPP services) needs another carnot.properties. It is required to be on the classpath so it can be found during runtime.
+
'''Client vs. Server'''<br>  
  
<br><br>
+
Stardust(exactly the carnot-engine) is the server. It (among others) creates the service objects we will use later. Its carnot.properties will be deployed in the Application Server/Container below WEB-INF/classes (or simmilar).<br>The client (the program you will write which will use the Stardust services) needs another carnot.properties. It is required to be on the classpath so it can be found during runtime.
  
<br><br>  
+
You can find your adequate carnot.properties in your Infinity installation directory: <br>'''EJB Mode'''<br>  
  
<br>
+
*&lt;INFINITY_HOME&gt;/work/default-ejb/etc/carnot.properties is a good starting point if you use IPP in EJB mode.
 +
Important configuration options are
 +
:*Client.ServiceFactory - default should be ok
 +
:*WorkflowService.JndiName - default should be ok
 +
:*AdministrationService.JndiName - default should be ok
 +
:*UserService.JndiName - default should be ok
 +
:*QueryService.JndiName - default should be ok
 +
:*JNDI.URL - Depends on your application server
 +
:*JNDI.InitialContextFactory - Depends on your application server

Revision as of 04:11, 16 November 2011

API Initialization

Purpose

Working with Stardust via the Java API always means working with Stardust's services. The commonly used ones areas

  • QueryService: It is used for any kind of information retrieval about processes, activites and their instances.
  • UserService: It is used for any kind of user-related operations like creating new user, granting roles and so on.
  • WorkflowService: Is is used for executing the process instances (starting, stopping, resuming and so on).
  • DocumentManagementService: Is is used for accessing a JCR repository.

But there are also others like the DocumentService for special purposes. All these services are used in the same way: They need to be initialized in order to work with them.

Solution

Working with the services is quite easy. Getting the service instances itself requires some setup. The initialization itself is done for you by Stardust.

Requirements

Your client's carnot.properties has to be set up correctly. If you use the Stardust in EJB-mode you need another carnot.properties as if stardust is deployed in Spring mode. But this is another carnot.properties as your server (Stardust itself) uses.

Client vs. Server

Stardust(exactly the carnot-engine) is the server. It (among others) creates the service objects we will use later. Its carnot.properties will be deployed in the Application Server/Container below WEB-INF/classes (or simmilar).
The client (the program you will write which will use the Stardust services) needs another carnot.properties. It is required to be on the classpath so it can be found during runtime.

You can find your adequate carnot.properties in your Infinity installation directory:
EJB Mode

  • <INFINITY_HOME>/work/default-ejb/etc/carnot.properties is a good starting point if you use IPP in EJB mode.

Important configuration options are

  • Client.ServiceFactory - default should be ok
  • WorkflowService.JndiName - default should be ok
  • AdministrationService.JndiName - default should be ok
  • UserService.JndiName - default should be ok
  • QueryService.JndiName - default should be ok
  • JNDI.URL - Depends on your application server
  • JNDI.InitialContextFactory - Depends on your application server

Back to the top