Tabnine Logo
ScopeType.isContextActive
Code IndexAdd Tabnine to your IDE (free)

How to use
isContextActive
method
in
org.jboss.seam.ScopeType

Best Java code snippets using org.jboss.seam.ScopeType.isContextActive (Showing top 10 results out of 315)

origin: org.jboss.seam/jboss-seam-ioc

 @Override
 public void afterCompletion(int status)
 {
   //Close the seam call we started if it is still active.
   if(ScopeType.APPLICATION.isContextActive()) {
    log.debug("Ending Transactional Seam Call");
    Lifecycle.endCall();
   } else {
    log.warn("Spring started a transactional Seam call but somebody else closed before it before the transaction committed.");
   }
 }
}
origin: org.jboss.seam/jboss-seam

  public static FacesMessages instance()
  {
   Component component = Component.forName(StatusMessages.COMPONENT_NAME);
   if(component != null && !component.getScope().isContextActive())
   {
     throw new IllegalStateException("No active "+component.getScope().name()+" context");
   }
   //Attempting to get the instance anyway for backwards compatibility with some potential hack situations.
   return (FacesMessages) Component.getInstance(StatusMessages.COMPONENT_NAME);
  }
}
origin: org.jboss.seam/jboss-seam

public static StatusMessages instance()
{
 Component component = Component.forName(StatusMessages.COMPONENT_NAME);
 if(component != null && !component.getScope().isContextActive())
 {
   throw new IllegalStateException("No active "+component.getScope().name()+" context");
 }
 //Attempting to get the instance anyway for backwards compatibility with some potential hack situations.
 return (StatusMessages) Component.getInstance(COMPONENT_NAME);
}
origin: org.jboss.seam/jboss-seam

protected static void runTasks()
{
 Component component = Component.forName(StatusMessages.COMPONENT_NAME);
 if( component != null && !component.getScope().isContextActive() )
 {
   return;
 }
 //Attempting to get the instance anyway for backwards compatibility with some potential hack situations.
 StatusMessages statusMessages = instance();
 if ( statusMessages != null )
 {
   statusMessages.doRunTasks();
 }
}
origin: org.jboss.seam/jboss-seam-ioc

/**
* Starts a Seam Call if one is not available and if executing within a Spring
* Transaction.
*/
public static void beginTransactionalSeamCall()
{
 if (ScopeType.APPLICATION.isContextActive())
 {
   log.debug("Application available.  Won't start a new call");
   return;
 }
 if (TransactionSynchronizationManager.isSynchronizationActive())
 {
   TransactionSynchronizationManager
       .registerSynchronization(new SeamLifecycleSynchronization());
   log.debug("Beginning Transactional Seam Call");
   Lifecycle.beginCall();
   return;
 }
 throw new IllegalStateException(
      "Seam application context not available and cannot be started.  "
          + "Seam Managed Persistence Context not available.  "
          + "Try placing the spring bean call inside of a spring transaction or try making the spring bean "
          + "a Seam Component using <seam:component/>.");
}
origin: org.jboss.seam/jboss-seam

   component.getScope();
if ( enforceRequired || outScope.isContextActive() )
origin: org.jboss.seam/jboss-seam

else if ( component.getScope().isContextActive() )
origin: org.jboss.seam/jboss-seam

Init.FactoryExpression methodBinding = init.getFactoryMethodExpression(name);
Init.FactoryExpression valueBinding = init.getFactoryValueExpression(name);
if (methodBinding != null && getOutScope(methodBinding.getScope(), null).isContextActive())
else if (valueBinding != null && getOutScope(valueBinding.getScope(), null).isContextActive()) 
else if (factoryMethod != null && getOutScope(factoryMethod.getScope(), factoryMethod.getComponent()).isContextActive())
origin: org.jboss.seam/jboss-seam

if ( enforceRequired || in.scope().isContextActive() )
origin: org.jboss.seam/jboss-seam

if ( scope!=ScopeType.STATELESS && scope.isContextActive() )
org.jboss.seamScopeTypeisContextActive

Popular methods of ScopeType

  • equals
  • getContext
  • getPrefix
  • name
  • toString
  • valueOf
  • values

Popular in Java

  • Creating JSON documents from java classes using gson
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (Timer)
  • notifyDataSetChanged (ArrayAdapter)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Top PhpStorm plugins
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