Factory class for creating local interfaces to data services.
This factory class can be used to create data services and prepared
statements for ad hoc queries, and perform remote write to file operations.
Hashtable h = new Hashtable();
h.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
h.put(Context.PROVIDER_URL,"t3://localhost:7001");
h.put(Context.SECURITY_PRINCIPAL,"weblogic");
h.put(Context.SECURITY_CREDENTIALS,"weblogic");
h.put(DataServiceFactory.ReadTransactionRequired,DataServiceFactory.ReadTransactionRequired);
InitialContext ctx= new InitialContext(h);
DataService ds = DataServiceFactory.newDataService(ctx,"Demo_Application","ld:myxds/Xds");
Method Summary |
static DataService |
newDataService(javax.naming.Context context,
java.lang.String appName,
java.lang.String xdsName)
Factory method to create a data service instance.
|
static DataService |
newDataService(javax.naming.Context context,
java.lang.String appName,
java.lang.String xdsName,
com.bea.dsp.dsmediator.client.SchemaTypeCache schemaTypeCache)
Factory method to create a data service instance.
|
static StreamingDataService |
newStreamingDataService(javax.naming.Context context,
java.lang.String appName,
java.lang.String xdsName)
Creates a streaming data service that can be used to get an XMLInputStream.
|
static PreparedExpression |
prepareExpression(javax.naming.Context context,
java.lang.String appName,
java.lang.String xquery)
Used to create a prepared expression, which is an ad hoc query that can
be executed against Liquid Data information.
|
static StreamingPreparedExpression |
streamingPreparedExpression(javax.naming.Context context,
java.lang.String appName,
java.lang.String xquery)
Creates a streaming prepared expression that can be used to get an XMLInputStream for ad hoc queries.
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReadTransactionAttribute
public static final java.lang.String ReadTransactionAttribute
- See Also:
- Constant Field Values
ReadTransactionNotSupported
public static final java.lang.String ReadTransactionNotSupported
- See Also:
- Constant Field Values
ReadTransactionRequired
public static final java.lang.String ReadTransactionRequired
- See Also:
- Constant Field Values
DataServiceFactory
public DataServiceFactory()
newDataService
public static DataService newDataService(javax.naming.Context context,
java.lang.String appName,
java.lang.String xdsName)
- Factory method to create a data service instance.
Returns a proxy for the given application and Data Service URL passed
- Parameters:
context
- The WebLogic Server contextappName
- The Liquid Data application namexdsName
- The data service name
- Returns:
- DataService A data service
newDataService
public static DataService newDataService(javax.naming.Context context,
java.lang.String appName,
java.lang.String xdsName,
com.bea.dsp.dsmediator.client.SchemaTypeCache schemaTypeCache)
- Factory method to create a data service instance.
Returns a proxy for the given application and Data Service URL passed
- Parameters:
context
- The WebLogic Server contextappName
- The Liquid Data application namexdsName
- The data service nameschemaTypeCache
- The cache instance managed by user
- Returns:
- DataService A data service
prepareExpression
public static PreparedExpression prepareExpression(javax.naming.Context context,
java.lang.String appName,
java.lang.String xquery)
- Used to create a prepared expression, which is an ad hoc query that can
be executed against Liquid Data information.
The query result is returned as an XmlObject.
- Parameters:
context
- The WebLogic Server contextappName
- The application namexquery
- The XQuery to be executed
- Returns:
- a PreparedExpression
newStreamingDataService
public static StreamingDataService newStreamingDataService(javax.naming.Context context,
java.lang.String appName,
java.lang.String xdsName)
- Creates a streaming data service that can be used to get an XMLInputStream.
This is a reference to a local EJB interface, and cannot be used from a remote client.
- Parameters:
context
- The WebLogic Server contextappName
- The application namexdsName
- The data service locator
- Returns:
- StreamingDataService
- Throws:
javax.naming.NamingException
streamingPreparedExpression
public static StreamingPreparedExpression streamingPreparedExpression(javax.naming.Context context,
java.lang.String appName,
java.lang.String xquery)
- Creates a streaming prepared expression that can be used to get an XMLInputStream for ad hoc queries.
This is a reference to a local EJB interface, and cannot be used from a remote client.
- Parameters:
context
- The WebLogic Server contextappName
- The application namexquery
- The XQuery to be executed
- Returns:
- StreamingPreparedExpression
- Throws:
javax.naming.NamingException
Copyright © 2006 BEA Systems Inc. All Rights Reserved.