Tabnine Logo
org.apache.openejb.jee
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.openejb.jee

Best Java code snippets using org.apache.openejb.jee (Showing top 20 results out of 315)

origin: stackoverflow.com

OkHttpClient defaultHttpClient = new OkHttpClient.Builder()
   .addInterceptor(
     new Interceptor() {
      @Override
      public Response intercept(Interceptor.Chain chain) throws IOException {
         Request request = chain.request().newBuilder()
         .addHeader("Accept", "Application/JSON").build();
       return chain.proceed(request);
      }
     }).build();
origin: stackoverflow.com

 public String messagesToJson(List<Message> messages) {  
  GsonBuilder gsonBuilder = new GsonBuilder();
  Gson gson = gsonBuilder.registerTypeAdapter(Message.class, new MessageAdapter()).create();
  return gson.toJson(messages);
}
origin: org.apache.openejb/openejb-jee

  public EnterpriseBean localBean() {
    setLocalBean(new Empty());
    return this;
  }
}
origin: org.apache.openejb/openejb-jee

public EjbLocalRef(final EjbReference ref) {
  this.ejbRefName = ref.getName();
  this.ejbRefType = ref.getEjbRefType();
  this.ejbLink = ref.getEjbLink();
  this.mappedName = ref.getMappedName();
  setDescriptions(ref.getDescriptions());
  this.injectionTarget = ref.getInjectionTarget();
  this.local = ref.getInterface();
  this.localHome = ref.getHome();
}
origin: org.apache.openejb/openejb-jee

@XmlElement(name = "message-driven-destination")
public void setMessageDrivenDestination(final MessageDrivenDestination value) {
  if (activationConfig == null) activationConfig = new ActivationConfig();
  final DestinationType destinationType = value.getDestinationType();
  if (destinationType != null) {
    activationConfig.addProperty("destinationType", destinationType.getvalue());
  }
  final SubscriptionDurability subscriptionDurability = value.getSubscriptionDurability();
  if (subscriptionDurability != null) {
    activationConfig.addProperty("subscriptionDurability", subscriptionDurability.getvalue());
  }
}
origin: org.apache.openejb/openejb-core

@Override
public boolean add(final PersistenceContextRef value) {
  if (!PersistenceContextType.EXTENDED.equals(value.getPersistenceContextType())
    && !super.contains(value)) {
    return super.add(value);
  }
  return false;
}
origin: org.apache.openejb/openejb-core

private static <R extends JndiReference> boolean isExtendedPersistenceContext(final R b) {
  return b instanceof PersistenceContextRef
    && PersistenceContextType.EXTENDED.equals(((PersistenceContextRef) b).getPersistenceContextType());
}
origin: org.apache.geronimo.ext.openejb/openejb-jee

@SuppressWarnings({"unchecked"})
protected K getKey(V value) {
  if (keyExtractor == null) {
    return ((Keyable<? extends K>)value).getKey();
  } else {
    return keyExtractor.getKey(value);
  }
}
origin: org.apache.geronimo.modules/geronimo-web-2.5-builder

@Override
public boolean afterOthers(WebFragmentEntry entry) {
  WebFragment webFragment = entry.getWebFragment();
  if (webFragment.getOrdering() != null) {
    OrderingOrdering after = webFragment.getOrdering().getAfter();
    if (after != null) {
      return after.getOthers() != null;
    }
  }
  return false;
}
origin: org.apache.tomee/openejb-jee

@XmlElement(name = "message-driven-destination")
public void setMessageDrivenDestination(final MessageDrivenDestination value) {
  if (activationConfig == null) activationConfig = new ActivationConfig();
  final DestinationType destinationType = value.getDestinationType();
  if (destinationType != null) {
    activationConfig.addProperty("destinationType", destinationType.getvalue());
  }
  final SubscriptionDurability subscriptionDurability = value.getSubscriptionDurability();
  if (subscriptionDurability != null) {
    activationConfig.addProperty("subscriptionDurability", subscriptionDurability.getvalue());
  }
}
origin: org.apache.tomee/openejb-core

@Override
public boolean add(final PersistenceContextRef value) {
  if (!PersistenceContextType.EXTENDED.equals(value.getPersistenceContextType())
    && !super.contains(value)) {
    return super.add(value);
  }
  return false;
}
origin: org.apache.tomee/openejb-core

private static <R extends JndiReference> boolean isExtendedPersistenceContext(final R b) {
  return b instanceof PersistenceContextRef
    && PersistenceContextType.EXTENDED.equals(((PersistenceContextRef) b).getPersistenceContextType());
}
origin: stackoverflow.com

 private static final Interceptor REWRITE_CACHE_CONTROL_INTERCEPTOR = new Interceptor() {
  @Override
  public Response intercept(Chain chain) throws IOException {
    Response originalResponse = chain.proceed(chain.request());
    return originalResponse.newBuilder()
        .header("Cache-Control", String.format("max-age=%d, only-if-cached, max-stale=%d", 120, 0))
        .build();
  }
};
origin: org.apache.tomee/openejb-core

private boolean isExtented(final PersistenceContextRef ref) {
  final PersistenceContextType type = ref.getPersistenceContextType();
  return type != null && type.equals(PersistenceContextType.EXTENDED);
}
origin: stackoverflow.com

 private static final Interceptor REWRITE_CACHE_CONTROL_INTERCEPTOR = new Interceptor() {
  @Override
  public Response intercept(Chain chain) throws IOException {
    Response originalResponse = chain.proceed(chain.request());
    return originalResponse.newBuilder()
                .removeHeader("Pragma")
                .header("Cache-Control",
                    String.format("max-age=%d", 60))
                .build();
  }
};
origin: stackoverflow.com

 OkHttpClient client = new OkHttpClient.Builder()
    .addInterceptor(new Interceptor() {
      @Override
      public Response intercept(Chain chain) throws IOException {
        Request newRequest = chain.request().newBuilder()
            .addHeader("X-TOKEN", "VAL")
            .build();
        return chain.proceed(newRequest);
      }
    })
    .build();

Picasso picasso = new Picasso.Builder(context)
    .downloader(new OkHttp3Downloader(client))
    .build();
origin: stackoverflow.com

OkHttpClient okClient = new OkHttpClient.Builder()
     .addInterceptor(
       new Interceptor() {
        @Override
        public Response intercept(Interceptor.Chain chain) throws IOException {
           Request original = chain.request();
           // Request customization: add request headers
           Request.Builder requestBuilder = original.newBuilder()
               .header("Authorization", token)
               .method(original.method(), original.body());
           Request request = requestBuilder.build();
           return chain.proceed(request);
         }
       })
     .build();
origin: stackoverflow.com

 public WebServiceClient() {
  OkHttpClient client = new OkHttpClient();
  client.setConnectTimeout(10, TimeUnit.SECONDS);
  client.setReadTimeout(30, TimeUnit.SECONDS);
  client.interceptors().add(new Interceptor() {
    @Override
    public Response intercept(Chain chain) throws IOException {
      return onOnIntercept(chain);
    }
  });
  Retrofit retrofit = new Retrofit.Builder()
      .baseUrl(BASE_URL)
      .addConverterFactory(GsonConverterFactory.create())
      .client(client)
      .build();
  webService = retrofit.create(WebService.class);
}
origin: stackoverflow.com

 OkHttpClient httpClient = new OkHttpClient.Builder()
 .addInterceptor(new Interceptor() {
  @Override
  public Response intercept(Chain chain) throws IOException {
   Builder ongoing = chain.request().newBuilder();
   ongoing.addHeader("Accept", "application/json;versions=1");
   if (isUserLoggedIn()) {
    ongoing.addHeader("Authorization", getToken());
   }
   return chain.proceed(ongoing.build());
  }
 })
 .build();

Retrofit retrofit = new Retrofit.Builder()
 // ... extra config
 .client(httpClient)
 .build();
origin: stackoverflow.com

.addInterceptor(new Interceptor() {
  @Override
  public Response intercept(Chain chain) throws IOException {
org.apache.openejb.jee

Most used classes

  • WebApp
    web-common_3_0.xsd Java class for web-appType complex type. The following schema fragment specif
  • JaxbJavaee
  • ServiceRef
    javaee6.xsd Java class for service-refType complex type. The following schema fragment specifies
  • EjbJar
    The ejb-jarType defines the root element of the EJB deployment descriptor. It contains - an optional
  • OpenejbJar
  • EnvEntry,
  • JndiConsumer,
  • EjbLocalRef,
  • ParamValue,
  • PersistenceContextRef,
  • PersistenceUnitRef,
  • ResourceEnvRef,
  • ResourceRef,
  • SessionBean,
  • EjbDeployment,
  • Interceptor,
  • MessageDestination,
  • MessageDestinationRef,
  • Servlet
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now