com.bea.ld.dsmediator.client
Class DataServiceFactory

java.lang.Object
  extended bycom.bea.ld.dsmediator.client.DataServiceFactory

Deprecated. Replaced by com.bea.dsp.dsmediator.client.* in Dasani release.

public class DataServiceFactory
extends java.lang.Object

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.

Example:
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");
InitialContext ctx= new InitialContext(h);
DataService ds = DataServiceFactory.newDataService(ctx,"Demo_Application","ld:myxds/Xds");

TRANSACTION SUPPORT

User can also make the DataService transaction aware by putting a TRANSACTION attribute in the Environment. Transaction attribute can be either NotSupported (DataServiceFactory.ReadTransactionNotSupported) OR Required (DataServiceFactory.ReadTransactionRequired)

Example:
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");


Field Summary
static java.lang.String ReadTransactionAttribute
          Deprecated.  
static java.lang.String ReadTransactionNotSupported
          Deprecated.  
static java.lang.String ReadTransactionRequired
          Deprecated.  
 
Constructor Summary
DataServiceFactory()
          Deprecated.  
 
Method Summary
static DataService newDataService(javax.naming.Context context, java.lang.String appName, java.lang.String xdsName)
          Deprecated. Factory method to create a data service instance.
static StreamingDataService newStreamingDataService(javax.naming.Context context, java.lang.String appName, java.lang.String xdsName)
          Deprecated. 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)
          Deprecated. 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)
          Deprecated. 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
 

Field Detail

ReadTransactionAttribute

public static final java.lang.String ReadTransactionAttribute
Deprecated. 
See Also:
Constant Field Values

ReadTransactionNotSupported

public static final java.lang.String ReadTransactionNotSupported
Deprecated. 
See Also:
Constant Field Values

ReadTransactionRequired

public static final java.lang.String ReadTransactionRequired
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

DataServiceFactory

public DataServiceFactory()
Deprecated. 
Method Detail

newDataService

public static DataService newDataService(javax.naming.Context context,
                                         java.lang.String appName,
                                         java.lang.String xdsName)
                                  throws java.lang.Exception
Deprecated. 
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 context
appName - The Liquid Data application name
xdsName - The data service name
Returns:
DataService A data service
Throws:
java.lang.Exception

prepareExpression

public static PreparedExpression prepareExpression(javax.naming.Context context,
                                                   java.lang.String appName,
                                                   java.lang.String xquery)
Deprecated. 
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 context
appName - The application name
xquery - 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)
                                                    throws javax.naming.NamingException,
                                                           ServerPrepareException
Deprecated. 
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 context
appName - The application name
xdsName - The data service locator
Returns:
StreamingDataService
Throws:
javax.naming.NamingException
ServerPrepareException

streamingPreparedExpression

public static StreamingPreparedExpression streamingPreparedExpression(javax.naming.Context context,
                                                                      java.lang.String appName,
                                                                      java.lang.String xquery)
                                                               throws javax.naming.NamingException,
                                                                      ServerPrepareException
Deprecated. 
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 context
appName - The application name
xquery - The XQuery to be executed
Returns:
StreamingPreparedExpression
Throws:
javax.naming.NamingException
ServerPrepareException


Copyright © 2006 BEA Systems Inc. All Rights Reserved.