Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Weblogic SingletonService on a standalone server

Is it possible to run weblogic's SingletoneService on none clustered environment? 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. 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

like image 875
mykola Avatar asked Dec 14 '25 17:12

mykola


2 Answers

Singleton Service can only be used in the context of a WebLogic cluster. For a standalone server @Singleton EJB annotation is enough.

The application which implements SingletonService works only on a managed server within a cluster. This application can not be deployed to a standalone managed server (i.e a managed server which is not part of any cluster).

like image 90
Mani Avatar answered Dec 17 '25 10:12

Mani


An easy solution is to fix the 'Check if MigrationBasis for cluster is configured' message by configuring the migration policy. 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

like image 27
Milo van der Zee Avatar answered Dec 17 '25 10:12

Milo van der Zee



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!