org.apache.openjpa.lib.util.Options.setProperty()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(8.0k)|赞(0)|评价(0)|浏览(184)

本文整理了Java中org.apache.openjpa.lib.util.Options.setProperty()方法的一些代码示例,展示了Options.setProperty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Options.setProperty()方法的具体详情如下:
包路径:org.apache.openjpa.lib.util.Options
类名称:Options
方法名:setProperty

Options.setProperty介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

// Turn off the Axsis Chunked feature, some service providers (like .Net) don't support chunked headers.
Options options = serviceClient.getOptions();
options.setProperty(HTTPConstants.CHUNKED, Constants.VALUE_FALSE);
serviceClient.setOptions(options);

代码示例来源:origin: stackoverflow.com

Options options = serviceClient.getOptions();
serviceClient.engageModule("test");

options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,loadPolicy("policy.xml"));
serviceClient.engageModule("rampart");
..

代码示例来源:origin: stackoverflow.com

Options options = stub._getServiceClient().getOptions();
 options.setProperty(HTTPConstants.CHUNKED, Boolean.FALSE);
 options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.FALSE);
 options.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION , Boolean.TRUE);
 options.setProperty(HTTPConstants.HTTP_PROTOCOL_VERSION,HTTPConstants.HEADER_PROTOCOL_10);

代码示例来源:origin: stackoverflow.com

Options options = serviceClient.getOptions();
options.setProperty(HTTPConstants.CHUNKED, Constants.VALUE_TRUE);
serviceClient.setOptions(options);

代码示例来源:origin: stackoverflow.com

// Proxy Settings    
HttpTransportProperties.ProxyProperties HTTPProxyProperties = new HttpTransportProperties.ProxyProperties();
HTTPProxyProperties.setProxyName("PROXYHOST");
HTTPProxyProperties.setProxyPort(PROXYPORT);
HTTPProxyProperties.setUserName("USERNAME");
HTTPProxyProperties.setPassWord("PASSWORD");
HTTPProxyProperties.setDomain("DOMAIN");

Options options = serviceStub._getServiceClient().getOptions();
options.setProperty(MessageContextConstants.HTTP_PROTOCOL_VERSION,
HTTPConstants.HEADER_PROTOCOL_10);
options.setProperty(HTTPConstants.PROXY, HTTPProxyProperties);

代码示例来源:origin: stackoverflow.com

//Fictious is the name of the web service
FictiousStub stub = new FictiousStub("servicelocation/fictiousService.php");

HttpTransportProperties.Authenticator authenticator = new Authenticator();
List<String> authSchemes = new ArrayList<String>();
authSchemes.add(Authenticator.DIGEST);
authenticator.setAuthSchemes(authSchemes);
authenticator.setUsername("admin");
authenticator.setPassword("12345");
authenticator.setPreemptiveAuthentication(true);
Options options = stub._getServiceClient().getOptions();
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, authenticator);
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, org.apache.axis2.Constants.VALUE_FALSE);

代码示例来源:origin: stackoverflow.com

// get Modulrepository
   ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem( AXIS2_REPOSITORY, null);
   // create new Stub
   Stub stub = createStub(ctx);
   // configure and engage Rampart
   ServiceClient client = stub._getServiceClient();
   Options options = client.getOptions();     
   // modify charset
   options.setProperty(org.apache.axis2.Constants.Configuration.CHARACTER_SET_ENCODING, charsetEncoding );
   // // modify endpoint
   // options.setTo(new org.apache.axis2.addressing.EndpointReference( ENDPOINT_LOCATION ));
   // modify policies
   Policy policy = loadPolicy(POLICY_FILE);
   client.getAxisService().getPolicySubject().attachPolicy(policy);

代码示例来源:origin: stackoverflow.com

Scheme http = new Scheme("http", PlainSocketFactory.getSocketFactory(), 80);
SchemeRegistry sr = new SchemeRegistry();
sr.register(http);
HttpParams httpParms = new BasicHttpParams();
ClientConnectionManager connManager = new ThreadSafeClientConnManager(httpParms, sr);
DefaultHttpClient httpclient = new DefaultHttpClient(connManager, httpParms);
httpclient.getAuthSchemes().register(HttpTransportProperties.Authenticator.NTLM, new NTLMSchemeFactory());
httpclient.getCredentialsProvider().setCredentials(new AuthScope(host, -1), new NTCredentials(user, pass, host, domain));

sps = new SharepointServiceStub(addr.toString());

List authScheme = new ArrayList();
authScheme.add(HttpTransportProperties.Authenticator.NTLM);
HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();
auth.setHost(host);
auth.setDomain(domain);
auth.setUsername(user);
auth.setPassword(pass);
auth.setAuthSchemes(authScheme);
Options options = sps._getServiceClient().getOptions();
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.REUSE_HTTP_CLIENT, true);
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.CACHED_HTTP_CLIENT, httpclient);
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, auth);
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.TRUE);
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.CONNECTION_TIMEOUT, 900000); // 15 minutes
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.SO_TIMEOUT, 180000); // 3 minutes

代码示例来源:origin: stackoverflow.com

public static void authenticate(ServiceClient client) {
   Options option = client.getOptions();
   HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();
   auth.setUsername("admin");
   auth.setPassword("admin");
   auth.setPreemptiveAuthentication(true);
   option.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, auth);
   option.setManageSession(true);
 }

代码示例来源:origin: org.apache.openjpa/openjpa-lib

if (key != null) {
    if (!StringUtil.isEmpty(value))
      setProperty(key, trimQuote(value));
    else
      setProperty(key, "true");
  setProperty(key, trimQuote(args[i]));
  key = null;
} else

代码示例来源:origin: stackoverflow.com

Options options = client.getOptions();`enter code here`
options.setManageSession(true);
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, authCookie);
Options option = e.getOptions();
option.setManageSession(true);
option.setProperty("Cookie", authCookie);

代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa

for (Iterator iter = anchors.iterator(); iter.hasNext(); ) { 
  Options clonedOptions = (Options) opts.clone();
  clonedOptions.setProperty("properties", iter.next().toString());
  ret &= launchRunnable(clonedOptions, runnable);

代码示例来源:origin: org.apache.openjpa/openjpa-all

for(String s : anchors ) { 
  Options clonedOptions = (Options) opts.clone();
  clonedOptions.setProperty("properties", s);
  ret &= launchRunnable(clonedOptions, runnable);

代码示例来源:origin: org.apache.openjpa/openjpa-lib

for(String s : anchors ) { 
  Options clonedOptions = (Options) opts.clone();
  clonedOptions.setProperty("properties", s);
  ret &= launchRunnable(clonedOptions, runnable);

代码示例来源:origin: org.apache.openejb.patch/openjpa

for(String s : anchors ) { 
  Options clonedOptions = (Options) opts.clone();
  clonedOptions.setProperty("properties", s);
  ret &= launchRunnable(clonedOptions, runnable);

代码示例来源:origin: org.apache.openejb.patch/openjpa

for (String a : anchors) {
  Options clonedOptions = (Options) opts.clone();
  clonedOptions.setProperty("properties", a);
  OpenJPAConfiguration conf = new OpenJPAConfigurationImpl();
  Configurations.populateConfiguration(conf, clonedOptions);

代码示例来源:origin: org.apache.openjpa/openjpa-all

for (String a : anchors) {
  Options clonedOptions = (Options) opts.clone();
  clonedOptions.setProperty("properties", a);
  OpenJPAConfiguration conf = new OpenJPAConfigurationImpl();
  Configurations.populateConfiguration(conf, clonedOptions);

代码示例来源:origin: org.apache.openjpa/openjpa-kernel

for (String a : anchors) {
  Options clonedOptions = (Options) opts.clone();
  clonedOptions.setProperty("properties", a);
  OpenJPAConfiguration conf = new OpenJPAConfigurationImpl();
  Configurations.populateConfiguration(conf, clonedOptions);

代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel

for (String a : anchors) {
  Options clonedOptions = (Options) opts.clone();
  clonedOptions.setProperty("properties", a);
  OpenJPAConfiguration conf = new OpenJPAConfigurationImpl();
  Configurations.populateConfiguration(conf, clonedOptions);

代码示例来源:origin: org.apache.openjpa/openjpa-jdbc

String schemas = opts.removeProperty("s");
if (schemas != null)
  opts.setProperty("schemas", schemas);

相关文章