congrats Icon
New! Announcing our next generation AI code completions
Read here
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

  • Making http post requests using okhttp
  • getExternalFilesDir (Context)
  • getResourceAsStream (ClassLoader)
  • putExtra (Intent)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • JLabel (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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