Singleton EJBs in Weblogic

Hello everyone,
I'm developing an application (with Weblogic 11gR1PS1) which needs a single point of access to get tickets for making requests. The numbers are sequential and cannot be 2 tickets with the same number, so Concurrency is an issue. Based on this we came up with 2 ideas:
1- Creating a singleton EJB which will generate the tickets number to avoid 2 concurrent instances to generate the same number (if executing aproximately at the same time). Unfortunately I don't know how to do that with EJB 3.0 , I know that EJB 3.1 has a @Singleton annotation but that's not an option.
2- Try to limit up the instances of a the generator Stateless Bean to 1 , making it a singleton. Unfortunately I don't know how to limit the number of instances in a pool of a specific EJB to 1, which is what is needed.
I don't know which solution suits best, or even if there is a third one which any of you might know. Any suggestions will be appreciated!
Thank you

To limit the number of beans in the pool you can use the following:
- create a deployment plan
- create a file a deployment override weblogic-ejb-jar.xml and place this in the right directory (defined in the deployment plan)
- add to the deployment override the following:
<?xml version='1.0' encoding='UTF-8'?>
<weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/10.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/10.0 http://www.bea.com/ns/weblogic/10.0/weblogic-ejb-jar.xsd">
<weblogic-enterprise-bean>
<ejb-name>NameOfYourEJB</ejb-name>
<stateless-session-descriptor>
<pool>
<max-beans-in-free-pool>1</max-beans-in-free-pool>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</pool>
</stateless-session-descriptor>
</weblogic-enterprise-bean>
Now there is only one bean in the pool. The problem with this is clients calling the EJB have to wait, until the EJB is released. This could have a negative effect on your response time of the application.
Maybe you can create a normal singleton, for example,
public class SomeSingleton {
private static final MyObject myObject;
private SomeSingletonl() {
static {
// create some instance of MyObject
public static MyObject getMyObject() {
return myObject;
Then you can call this from your EJB

Similar Messages

  • Error deploying EJB in weblogic 7.0

    Hello
    I am trying to deploy EJB 2.0, to Weblogic 7.0 server on IBM machine and i am
    getting this following error. Previously I have tested deploying the same EJB
    to weblogic 7.0 server on my local PC which based on Windows, and everything seems
    Ok.
    Unable to deploy EJB: DACEJB.jar from DACEJB.jar:
    Compiler failed executable.exec(java.lang.String[javac, -nowarn, -classpath, /bea/weblogic700/server/bin/tmp_ejbsmeap01ibm7001myserver/-1spvbzuqlvq3z:/bea/weblogic700/server/bin/DACEJB.jar:/usr/java131/jre/lib/rt.jar:/usr/java131/jre/lib/i18n.jar:/usr/java131/jre/classes:/CMS/CORP/config/:/bea/weblogic700:/bea/weblogic700/server/lib/crack.jar:/bea/weblogic700/server/lib/classes12_g.jar:/bea/weblogic700/server/lib/HostMsgDriverV2.1_oracle.jar:/bea/weblogic700/server/lib/aal2wrap.jar:/bea/weblogic
    700/server/lib/log4j.jar:/bea/weblogic700/server/lib/Opta2000.jar:/bea/weblogic700/server/lib/xmlx.jar:/bea/weblogic700/server/lib/VelisAuth.jar:/bea/weblogic700/server/lib/jython.jar:/usr/java131/lib/tools.jar:/bea/weblogic700/server:/bea/weblogic700/server/lib/weblogic_sp.jar:/bea/weblogic700/server/lib/weblogic.jar:,
    -d, tmp_ejbsmeap01ibm7001myserver/-
            at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java(Compiled
    Code))
            at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:396)
            at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:490)
            at weblogic.ejb20.deployer.EJBDeployer.compileEJB(EJBDeployer.java:793)
            at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1242)
            at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:242)
            at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java(Compiled
    Code))
            at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java(Compiled
    Code))
            at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java(Compiled
    Code))
            at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java(Compiled
    Code))
            at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java(Compiled
    Code))
            at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
            at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java(Compiled Code))
            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    This may happen because javac is not available to weblogic.
    Make sure that PATH environment variable used to start the server includes path to Java SDK bin dir with javac in it.
    Regards,
    Slava Imeshev
    "Jennifer" <[email protected]> wrote in message news:[email protected]...
    >
    Hello
    I am trying to deploy EJB 2.0, to Weblogic 7.0 server on IBM machine and i am
    getting this following error. Previously I have tested deploying the same EJB
    to weblogic 7.0 server on my local PC which based on Windows, and everything seems
    Ok.
    Unable to deploy EJB: DACEJB.jar from DACEJB.jar:
    Compiler failed executable.exec(java.lang.String[javac, -nowarn, -classpath,
    /bea/weblogic700/server/bin/tmp_ejbsmeap01ibm7001myserver/-1spvbzuqlvq3z:/bea/weblogic700/server/bin/DACEJB.jar:/usr/java131/jre/lib/rt.jar:/usr/java131/jre/lib/i18n.jar:/usr/java131/jre/classes:/CMS/CORP/config/:/bea/weblogic700:/bea/weblogic700/server/lib/crack.jar:/bea/weblogic700/server/lib/classes12_g.jar:/bea/weblogic700/server/lib/HostMsgDriverV2.1_oracle.jar:/bea/weblogic700/server/lib/aal2wrap.jar:/bea/weblogic>700/server/lib/log4j.jar:/bea/weblogic700/server/lib/Opta2000.jar:/bea/weblogic700/server/lib/xmlx.jar:/bea/weblogic700/server/lib/VelisAuth.jar:/bea/weblogic700/server/lib/jython.jar:/usr/java131/lib/tools.jar:/bea/weblogic700/server:/bea/weblogic700/server/lib/weblogic_sp.jar:/bea/weblogic700/server/lib/weblogic.jar:,> -d, tmp_ejbsmeap01ibm7001myserver/->>>         at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java(Compiled> Code))>         at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:396)>         at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:490)>         at weblogic.ejb20.deployer.EJBDeployer.compileEJB(EJBDeployer.java:793)>         at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1242)>         at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:242)>         at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java(Compiled> Code))>         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java(Compiled> Code))>         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java(Compiled> Code))>         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java(Compiled> Code))>         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java(Compiled> Code))>         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)>         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java(Compiled Code))>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Urgent!!!!How to deploy only an EJB from Weblogic to oc4j.

    Hi
    How can i deploy only EJB from Weblogic into oc4j without any web application or client coming into pitcture as my client access bean remotely....
    regards,
    Sapthapathi

    If you are migrating from ejb1.1->ejb1.1 you shouldn't have many changes - your ejb-jar.xml file should be the same (I assume you are still talking about ejbs). Once you pull over the base ejb - then if you want to, mess around with the automatically generated orion-ejb-jar.xml file. Obviously - those are all app server specific. I go back and forth between wls6.1 and oc4j all the time. When going from wls5.1 to oc4j - what particular issues do you run into. What do you mean, in particular, by configuration changes?
    Curious -
    Ray
    hi,
    EJBs and other applications can be migrated from weblogic to oc4j but many changes are required.These changes are mainly configuration changes rather than code changes.Infact there are many problems in effect while migrating and delloyment.Hope oracle is a bit more attentive to this issue.
    regards,
    chennai

  • Ejb-jar.xml中的EJB QL和weblogic-cmp-rdbms-jar.xml中的WLQL

    我想问一下,在ejb-jar.xml文件中用EJB QL查询语言定义了相应的EJB QL查询语句后,在weblogic-cmp-rdbms-jar.xml文件中还需不需要用wlql语言来定义相应的查询语句呀?

    在Weblogic6.0中,如果你需要利用EJB2.0的EJBQL语言所不提供的
    ORDERBY排序功能,那么这时候可以在weblogic-cmp-rdbms-jar.xml中用WLQL覆盖它,一般情况下,在ejb-jar.xml中声明一个EJBQL方法就可以了,WLQL可有可无。

  • EJB in weblogic

    Can anyone tell me how to run EJB in weblogic.Or can we run in Tomcat.

    javatolearn wrote:
    Can anyone tell me how to run EJB in weblogic.Yes.
    Create an EJB, package it into an EAR file, and deploy it to your WebLogic domain.
    Or can we run in Tomcat.No.
    %

  • EJB and WebLogic

    I am quite new to weblogic. I created very simple application, stockonline using ejb in weblogic. The compilation and package were OK. But when I deploy ejb jar name stockonline-core-1.0.jar in weblogic, I always got the same error
    Exception:weblogic.management.ApplicationException: prepare failed for stockonline-core-1.0 Module: stockonline-core-1.0 Error: Exception preparing module: EJBModule(stockonline-core-1.0,status=NEW) Unable to deploy EJB: Account from stockonline-core-1.0.jar: java.lang.AssertionError: Unable to find expected methods. Please check your classpath for stale versions of your ejb classes and re-run weblogic.ejbc at stockonline.bean.ejb.Account_hzbwy8_LocalHomeImpl.<clinit>(Account_hzbwy8_LocalHomeImpl.java:65) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:308) at java.lang.Class.newInstance(Class.java:261) at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.prepare(ClientDrivenBeanInfoImpl.java:1026) at weblogic.ejb20.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:1004) at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1345) at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:498) at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:3142) at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1583) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1227) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1070) at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2513) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2463) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2379) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    * [Deployer:149033]preparing application stockonline-core-1.0 on myserver
    * [Deployer:149033]failed application stockonline-core-1.0 on myserver
    * [Deployer:149034]An exception occurred for task [Deployer:149026]Deploy application stockonline-core-1.0 on myserver.: Exception:weblogic.management.ApplicationException: prepare failed for stockonline-core-1.0 Module: stockonline-core-1.0 Error: Exception preparing module: EJBModule(stockonline-core-1.0,status=NEW) Unable to deploy EJB: Account from stockonline-core-1.0.jar: java.lang.AssertionError: Unable to find expected methods. Please check your classpath for stale versions of your ejb classes and re-run weblogic.ejbc at stockonline.bean.ejb.Account_hzbwy8_LocalHomeImpl.<clinit>(Account_hzbwy8_LocalHomeImpl.java:65) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:308) at java.lang.Class.newInstance(Class.java:261) at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.prepare(ClientDrivenBeanInfoImpl.java:1026) at weblogic.ejb20.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:1004) at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1345) at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:498) at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:3142) at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1583) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1227) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1070) at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2513) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2463) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2379) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) .
    When I looked at the come of Account_hzbwy8_LocalHomeImpl.java, the error was with create method. I don't why. I don't think any problem with the application logic since I deployed the same code in JBoss and it worked. Could anyone help me? I really appreciate. I use weblogic with oracle in a remote machine.
    I used maven to package.
    <postGoal name="ejb:ejb">
    <ant:java classname="weblogic.ejbc" fork="yes" failonerror="yes">
    <!--ant:sysproperty key="weblogic.home" value="${WL_HOME}/server"/-->
    <ant:arg line="-compiler javac ${maven.build.dir}/${maven.final.name}.jar" />
    <ant:classpath>
    <ant:pathelement path="${WL_HOME}/server/lib/weblogic.jar" />
    <ant:pathelement location="${env.JAVA_HOME}/lib/tools.jar"/>
    <ant:pathelement location="${USER_MAVEN}/stockonline/jars/stockonline-common-1.0.jar"/>
    </ant:classpath>
    </ant:java>
    </postGoal>     
    Thanks
    Betty

    Hi,guys, I am new to EJB. when i want to deploy the EJB,I got the problem,which is similar yours:
    Exception:weblogic.management.ApplicationException: prepare failed for HelloEJB Module: HelloEJB Error: Exception preparing module: EJBModule(HelloEJB,status=NEW) Unable to deploy EJB: HelloWorld from HelloEJB.jar: java.lang.AssertionError: Unable to find expected methods. Please check your classpath for stale versions of your ejb classes and re-run weblogic.ejbc at hello.HelloWorld_ap17lf_HomeImpl.<clinit>(HelloWorld_ap17lf_HomeImpl.java:55) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:306) at java.lang.Class.newInstance(Class.java:259) at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.prepare(ClientDrivenBeanInfoImpl.java:921) at weblogic.ejb20.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:983) at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1283) at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:477) at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:2847) at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1534) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1188) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1031) at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2634) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2584) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2506) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:833) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:542) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:500) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    [Deployer:149033]preparing application HelloEJB on admin
    [Deployer:149033]failed application HelloEJB on admin
    [Deployer:149034]An exception occurred for task [Deployer:149026]Deploy application HelloEJB on admin.: Exception:weblogic.management.ApplicationException: prepare failed for HelloEJB Module: HelloEJB Error: Exception preparing module: EJBModule(HelloEJB,status=NEW) Unable to deploy EJB: HelloWorld from HelloEJB.jar: java.lang.AssertionError: Unable to find expected methods. Please check your classpath for stale versions of your ejb classes and re-run weblogic.ejbc at hello.HelloWorld_ap17lf_HomeImpl.<clinit>(HelloWorld_ap17lf_HomeImpl.java:55) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:306) at java.lang.Class.newInstance(Class.java:259) at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.prepare(ClientDrivenBeanInfoImpl.java:921) at weblogic.ejb20.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:983) at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1283) at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:477) at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:2847) at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1534) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1188) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1031) at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2634) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2584) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2506) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:833) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:542) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:500) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    Is somebody can help me to fix , thanks !!

  • Error deploying EJB on weblogic: Unable to set the transaction attribute

    Hi,
    I'm trying to deploy an application in WL10.3.2 and an error occurred during activation of changes.
    Here is the error message from the log file:
    <Jun 6, 2011 1:28:27 PM MDT> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'serverEAR-2' due to error weblogic.application.ModuleException: Exception preparing module: EJBModule(serverEJB-2.8.0.jar)
    Unable to deploy EJB: C:\oracle\Middleware\user_projects\domains\base_domain\servers\Server_3\tmp\_WL_user\serverEAR-2\1zw7ao\serverEJB-2.8.0.jar from serverEJB-2.8.0.jar:
    Unable to set the transaction attribute for method 'saveActionGroup(EditableActionGroup)' on EJB 'ViewBean'. No matching method could be found. Please verify the method signature specified in the ejb-jar.xml file matches that of your Remote interface for this EJB.
    weblogic.application.ModuleException: Exception preparing module: EJBModule(serverEJB-2.8.0.jar)
    Unable to deploy EJB: C:\oracle\Middleware\user_projects\domains\base_domain\servers\Server_3\tmp\_WL_user\serverEAR-2\1zw7ao\serverEJB-2.8.0.jar from serverEJB-2.8.0.jar:
    Unable to set the transaction attribute for method 'saveActionGroup(EditableActionGroup)' on EJB 'ViewBean'. No matching method could be found. Please verify the method signature specified in the ejb-jar.xml file matches that of your Remote interface for this EJB.
         at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:454)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:391)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:59)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.ejb.container.deployer.DeploymentDescriptorException: Unable to set the transaction attribute for method 'saveActionGroup(EditableActionGroup)' on EJB 'ViewBean'. No matching method could be found. Please verify the method signature specified in the ejb-jar.xml file matches that of your Remote interface for this EJB.
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.processCTs(MBeanDeploymentInfoImpl.java:1502)
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.processSpecificMethodCTs(MBeanDeploymentInfoImpl.java:1472)
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.initializeTransactionAttribute(MBeanDeploymentInfoImpl.java:773)
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoImpl.java:259)
         at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1190)
         Truncated. see log file for complete stacktrace
    Please help me...Thanks.

    In your ejb-jar.xml you are referring to a method saveActionGroup(EditableActionGroup) which is not defined in your remote interface.
    Maybe you have made some typo in the configuration. Check your transaction section, i.e.,
    <container-transaction>
                <method>
                    <ejb-name>ViewBean</ejb-name>
                    <method-name>saveActionGroup</method-name>
                    <method-params>
                        <method-param>package.EditableActionGroup</method-param>
                    </method-params>
                </method>
                <trans-attribute>Required</trans-attribute>
    </container-transaction>or something similar. See if the defined methods are corresponding to the methods defined in the remote interface.

  • Message EJB using Weblogic JMS Server

    Hi,
              I trying get some working logic about using JMS with weblogic. I have created a JMS Server instance with all the necessary Connection Factories and Destinations. I am able to connect to from a normal Java class, but i want to deploy a message driven ejb in weblogic and connect to the same JMS Server instance. When i deploy my EJB i get an error about unable to connect to the JMS Server in the weblogic.log . Could any please refer me to any resourcce that may help me.
              

              Thanks, i got it sorted out.
              Tom Barnes <[email protected]> wrote:
              >Unless you're descriptors make use of the weblogic extensions to specify
              >the jndi URL, make sure that the MDB and the JMS Server instance are
              >either
              >both located on the same WL server or are both in the same cluster.
              >
              >If this doesn't help, please post the stack trace for you're error
              >and attach your config.xml and MDB descriptor xml.
              >
              >Tom
              >
              >Riaan Minne wrote:
              >
              >> Hi,
              >>
              >> I trying get some working logic about using JMS with weblogic. I have
              >created a JMS Server instance with all the necessary Connection Factories
              >and Destinations. I am able to connect to from a normal Java class,
              >but i want to deploy a message driven ejb in weblogic and connect to
              >the same JMS Server instance. When i deploy my EJB i get an error about
              >unable to connect to the JMS Server in the weblogic.log . Could any
              >please refer me to any resourcce that may help me.
              >
              

  • How can I connect JSP in IPlanet that access to EJB in Weblogic?

    Hi:
    I have a JSP in IPlanet that access to EJB in Weblogic.
    IPlanet and Weblogic are installed in different machines.
    I don't know what code source and deployment actions to do to connect jsp and ejb. Can anybody guide me?
    Thanks in advance,
    David B.

    Hi,
    now only i am initiating the combination of iplanet webserver 4.1 and weblogic 5.1 application server for my project. I can able to execute jsps through iplanet webserver.
    Can u explain clearly jsps calls over to ejb which is stored in weblogic? How i will handle this combination in single machine?
    thanks in advance
    vijay.

  • Deploy the EJB in Weblogic server

    Hi all
    How do deploy the EJB In WebLogic server ?
    How do call the Deployed EJB from your client Program?
    Plz...Help Me.........

    How do deploy the EJB In WebLogic server ?first create ejb-jar.
    then package ur ejb-jar inside an ear.
    deploy this ear in weblogic. (i hope u know how to create a domain in weblogic. if not, refer weblogic online help)
    How do call the Deployed EJB from your client
    Program?while packaging the ejb-jar, u would have given some jndi names to ur APIs. use this jndi name to do a lookup on the context of ur server. u will get home interface. call create method on this interface. u get remote interface. now u can call the business methods.
    in case u r clueless on wht i m talking abt, u got a long way to go. understanding the weblogic, ejbs, packaging, deployment, JNDIs is quite involving to say the least.
    regards

  • I have deploy an EJB in weblogic 6.1,but how to use jsp to invoke the EJB's method?

    i have deploy an EJB in weblogic 6.1,but how to use jsp to invoke the EJB's method?
    thanks!

    You'd do something like:
    <%
    //vvv this part can potentially be done in initialization
    Context ctx = getInitialContext();
    BeanHome home =
    (BeanHome)PortableRemoteObject.narrow(ctx.lookup("the.jndi.name"),
    BeanHome.class);
    Bean b = home.create();
    //^^^
    Result r = b.invokeMethod();
    %>
    "toxin" <[email protected]> wrote in message
    news:3d2e95e5$[email protected]..
    >
    i have deploy an EJB in weblogic 6.1,but how to use jsp to invoke theEJB's method?
    thanks!

  • Deploying EJB on Weblogic

    Hi,
    Can anyone please send the step by step detailed instructions for deploying EJBs on Weblogic 6.1 app server. Please send it to my email id [email protected]
    Any supporting code will be greatly appreciated.
    Thanks.

    Why don't you check out the excellent instructions that BEA makes available from their support site:
    Specific to your current question:
    http://edocs.bea.com/wls/docs61/ejb/index.html
    and even more specific:
    http://edocs.bea.com/wls/docs61/ejb/deploy.html#1050867
    And more general info:
    http://edocs.bea.com/wls/docs61/index.html

  • Please give step by step details how can I deploy an EJB on weblogic 7

    Hi,
    I was working on Blazix Server for EJB.It is very esay to deploy bean on blazix
    server.Now I have to use weblogic 7. So please explain me step by step of deployment
    of EJB on weblogic. I don't know abcd of Weblogic Server.
    Thanking You,
    waiting for ur postive response,
    Mahendra Mahajan

    Hello Mahendra,
    There is no need to copy and paste all of the WebLogic documentation here. Just
    follow the steps in the documentation and you should be fine. If you run into
    a specific problem, we would be happy to assist you. Begin with the following
    EJB programming guide:
    http://edocs.bea.com/wls/docs81/ejb/index.html
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Mahendra Mahajan" <[email protected]> wrote:
    >
    Hi,
    I was working on Blazix Server for EJB.It is very esay to deploy
    bean on blazix
    server.Now I have to use weblogic 7. So please explain me step by step
    of deployment
    of EJB on weblogic. I don't know abcd of Weblogic Server.
    Thanking You,
    waiting for ur postive response,
    Mahendra Mahajan

  • Singleton ejb?

    Hi
              I need to wrapp an EJB service in a singleton service.
              But I don't know which class should be implements the weblogic.cluster.singleton.SingletonService interface (the home, remote or the bean).
              So what is the class that should implement this interface weblogic.cluster.singleton.SingletonService?
              Thanks in advance

    EJB 3.0 only supports programmatic timer creation. The app can contain an enterprise bean component that supports timer callbacks (a "timed object" in spec parlance) , but the actual timers can only be created by calling TimerService.createTimer(). Given that :
    1. There is no automatic timer creation as a result of deployment. Some developers approximate automatic timer creation
    by calling a stateless session bean method from a web application initialization callback, but from the ejb container's perspective
    that's just a normal run-time timer creation. In all cases you'll have as many timers as the number of times TimerService.createTimer() was called.
    2. In a cluster, for each unique timer, each timer timeout callback will happen in only one server instance in the cluster. We do that
    by using the underlying timer database and an ownership semantic that assigns each timer to a particular server instance. During
    failover, ownership of timers owned by the failed server instance is reassigned to a healthy server instance. Note that this only applies
    to timeout callbacks. All timers created by a bean are always visible to any instances of that bean in any server instance in the cluster.
    In other words, getTimers() always returns the total number of timers associated with the bean component, even if the callbacks
    happen in a different server instance in the cluster.
    3. Each call to TimerService.createTimer() is unique across the cluster. However, the burden of ensuring that createTimer() is only
    called once is on the application. EJB 3.1 will address this problem by adding "automatic timers". These are timers that are
    specified via metadata (annotation or ejb-jar.xml) and are created automatically as a result of deployment.

  • Singleton serialization and weblogic - help!

    hi everyone,
    I'm trying to serialize a singleton cache object we're using for our (intranet)
    website running on weblogic 6.1. I've made sure the singleton class
    implements serializable, and i've also put the following method in the
    singleton class (ChartCache.java):
    private Object readResolve()
    return theInstance; //which is of type ChartCache
    By the way I'm using jdk 1.3. I've trawled the web and can't find anything to help me yet...
    Basically I've written a jsp to get the current instance of the cache
    and serialize it to a file. When I invoke another jsp i want it to
    reinflate the object and place it back into the weblogic jvm so it can
    once again be accessed as a singleton by all classes in the webapp. At
    the moment its just not working - the cache object will eventually
    take over half an hour to create (huge database processing going on)
    so I want the option, if weblogic falls over, to reinstantiate the
    cache without having to rebuild it from scratch. The cache will only
    be refreshed once a day.
    I'll c&p my jsp code below...
    ======================= restoreCache.jsp
    <%@ page import = "java.util.*" %>
    <%@ page import = "java.io.*" %>
    <%@ page import = "com.drkw.agencylending.website.chartcache.*" %>
    <%@ page import = "com.drkw.agencylending.log.Logger" %>
    <%
    ChartCache theCache = null;
    try
    String filename = "chartCache.dat";
    FileInputStream fis = new FileInputStream(filename);
    ObjectInputStream in = new ObjectInputStream(fis);
    theCache = (ChartCache)in.readObject();
    in.close();
    catch(Exception e)
    Logger.log(e);
    %>
    Resurrected chart cache from file.
    ======================= saveCache.jsp
    <%@ page import = "java.util.*" %>
    <%@ page import = "java.io.*" %>
    <%@ page import = "com.drkw.agencylending.website.chartcache.*" %>
    <%@ page import = "com.drkw.agencylending.log.Logger" %>
    <%
    ChartCache theCache = ChartCache.getInstance();
    String fileName = "chartCache.dat";
    try
    FileOutputStream fos = new FileOutputStream(fileName);
    ObjectOutputStream oos = new ObjectOutputStream(fos);
    oos.writeObject(theCache);
    oos.flush();
    oos.close();
    catch(Exception e)
    Logger.log(e);
    %>
    Wrote cache object to file.
    ============================
    At the moment, a file is getting written but it seems suspiciously
    small (73 bytes!) for what is a very large object. When I try to load
    it up again, I get no errors but when I call ChartCache.getInstance()
    (my singleton) it recreates the cache rather than using the one I've
    reinflated. BTW I don't need to worry about server clustering/JNDI to
    ensure I have a truly singleton instance - there will only ever be one
    JVM to worry about.
    Any help greatly appreciated!

    solved the problem using another technique. Rather
    than serialize the entire singleton object, I just
    serialized the hashmap (the only bit I really care
    about). Then in the private constructor, the class
    checks a database flag to see whether the singleton
    was created today - if not, I refresh the cache,
    otherwise load in the serialized hashmap and set that
    as my class member. No complicated jndi/ejb registry
    needed to get around it..!singleton serialization is not recommended in ejb enviroment, it will cause problems. in what you are doing, it is far better to persist the data values in a database.
    just for the sake of writing a serializable sington: in addition to what you do in a regular object, you would first check to see if this obj has been serialized, if it is, deserialize it and return this one. you would have to write your own method to do serialization, making sure you have only one place to serialize it, and let the object know where the file is.

Maybe you are looking for

  • Using Ipod as a backup

    I was concerned about backing up my music files when I realized that the Ipod itself was a handy backup. All of my music was on the portable harddrive known as "my Ipod". I went into the Apple store and wanted to talk to the technicians about using t

  • Why "Response.Cache.SetAllowResponseInBrowserHistory(False)" and "Response.Cache.SetCacheability(HttpCacheability.NoCache)" don't work with FireFox 3.x???

    I have created a website and I don't want user to use Back button to see previous pages. How to disable History in FireFox 3.x and above? The following code doesn't seem to work: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.Event

  • How can Maximum Display Time in Chart Recorder be increased to hours/days?

    Error message displayed when Recorder Display Time (X-Axis) is increased beyond ~0.25 hours, saying maximum display time has been reached.  MUST be able to display time in range of days - although since data display rate (not Dasylab sampling rate, d

  • Postion creation

    Is there any function which can create positions and return position number, so that I will use that position for creating others relationships like org unit, report to, job, cost center, 1002, 1007, 1008, 9103 and 9106? One action has configured usi

  • Bom integeration

    Hi, here is a scenario that,  we got EBOM  and with respect to EBOM, MBOM is derieved by copy from EBOM and did some modification in component level in MBOM. here some components in EBOM will be same as MBOM. so client ask for integeration between EB