简体   繁体   English

独立服务器上的Weblogic SingletonService

[英]Weblogic SingletonService on a standalone server

Is it possible to run weblogic's SingletoneService on none clustered environment? 是否可以在任何集群环境中运行weblogic的SingletoneService? I've tried and got this: 我试过这个:

<30.10.2012 18:25:57> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 1 task for the application 'myApplication'.> 
<30.10.2012 18:25:57> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'myApplication'.> 
<30.10.2012 18:25:57> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.management.DeploymentException: 
    at weblogic.application.internal.flow.SingletonServicesFlow.activate(SingletonServicesFlow.java:67)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
    at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:16)
    Truncated. see log file for complete stacktrace
java.lang.IllegalArgumentException: Cannot add Singleton Service DemoSingleton as SingletonServicesManager not started.  Check if MigrationBasis for cluster is configured.
    at weblogic.cluster.singleton.SingletonServicesManager.addConfiguredService(SingletonServicesManager.java:280)
    at weblogic.cluster.singleton.SingletonServicesManager.addConfiguredService(SingletonServicesManager.java:297)
    at weblogic.application.internal.flow.SingletonServicesFlow.activate(SingletonServicesFlow.java:65)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
    Truncated. see log file for complete stacktrace
> 

Of course i don't have a configured MigrationBasis for cluster as i don't have cluster. 当然我没有为集群配置MigrationBasis,因为我没有集群。 But i thought it's possible to make it run both on cluster and on standalone server. 但我认为可以在集群和独立服务器上运行它。 Am i wrong or may be there are some other errors with SingletoneService that can lead to this error 我错了或者SingletoneService可能存在其他一些可能导致此错误的错误

Singleton Service can only be used in the context of a WebLogic cluster. Singleton Service只能在WebLogic群集的上下文中使用。 For a standalone server @Singleton EJB annotation is enough. 对于独立服务器,@ Singleton EJB注释就足够了。

The application which implements SingletonService works only on a managed server within a cluster. 实现SingletonService的应用程序仅适用于集群中的受管服务器。 This application can not be deployed to a standalone managed server (ie a managed server which is not part of any cluster). 此应用程序无法部署到独立的受管服务器(即不属于任何群集的受管服务器)。

An easy solution is to fix the 'Check if MigrationBasis for cluster is configured' message by configuring the migration policy. 一个简单的解决方案是通过配置迁移策略来修复“检查是否已配置集群的MigrationBasis”消息。 After that the singleton can also be deployed on a single node (Single node cluster). 之后,单例也可以部署在单个节点(单节点集群)上。 Under Environment -> Clusters you'll find the following settings: Environment - > Clusters下,您将找到以下设置:

环境 - >集群

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM