Exposing business process as session bean

Is it possible to expose a Workshop business process as a session bean?
I know they are deployed as session beans, but we don't have any control over the jndi name and remote/home interface names.
Thanks for any help. I'm really stuck on this one...
- Rob

Well, the answer to this is to create a JPD Proxy and call that from the session bean. I would have thought that a biz process control was useable anywhere...guess not.

Similar Messages

  • Parallel Processing in Session Beans?

    Hi,
    I'm trying to do a simple use case of processing (saving 1000s) of records. Essentially, MY session bean calls another session bean synchronously which does the saving. I'm iterating over 1000s of records and one by one calling the second session bean - which I feel is very inefficient. I'd like to break up the 1000 records into chunks of 200 records - hence thought of starting 5 worker threads to save these records in parallel. All the 1000 records have to be in a single transaction and hence I can't use MDBs. And I know I can't start Threads in EJBs.Any suggestions?

    Titan1978 wrote:
    Hi,
    I'm trying to do a simple use case of processing (saving 1000s) of records. Essentially, MY session bean calls another session bean synchronously which does the saving. I'm iterating over 1000s of records and one by one calling the second session bean - which I feel is very inefficient. I'd like to break up the 1000 records into chunks of 200 records - hence thought of starting 5 worker threads to save these records in parallel. All the 1000 records have to be in a single transaction and hence I can't use MDBs. And I know I can't start Threads in EJBs.Any suggestions?As long as the second EJB shares the same transaction as the first one, its not inefficient.

  • Business Delegate (remove session bean)

    HI all,
    I followed the code example of Business Delegate pattern
    as described in java.sun.com site.
    Everything is well, but I have only a doubt:
    in Business Delegate's constructor the Business Delegate object
    create the session bean reference that it will use.
    I don't see any call to session.remove() method.
    Is it a forgetfulness or there is no real need to call the remove method ?
    May developers rely on the Application Server for bean's removal ?
    (removal for Statfeul or pooling for Stateless)
    Many thanks in advance
    Moreno

    Yes, it's fine to rely on the ejb container to remove both stateful session bean and stateless session bean resources. Most ejb containers define a timeout period after which stateful session beans that have not been accessed will be removed. Similar settings typically control the amount of time a stateless session bean instance will be pooled within the container.
    If you'd like more predictable, programmatic control for stateful session bean removal, you can explicitly call EJBObject.remove(). In that case, the ejb container is required to call ejbRemove on the corresponding stateful session bean, assuming it hasn't already been removed. For stateless session beans, EJBObject.remove() is merely a hint to the container, and might not result in any specific action on the pooled instances. Hope this helps.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • SAP TechEd- Business Process Management Sessions

    Looking for answers on "Business Process Management, Integration and Collaboration," check out the related educational sessions at SAP TechEd 2011 ([Las Vegas|http://bit.ly/pAlIoQ], [Bangalore|http://bit.ly/pPxA9X ], [Madrid|http://bit.ly/pjjfyE ]). [Register today|http://www.sdn.sap.com/irj/scn/sapteched]!

    It's Netweaver. For more details:
    http://help.sap.com/saphelp_nw70/helpdata/EN/30/c4461ff69d5a438f1286e344b545fa/frameset.htm
    Regards, IA

  • EJB 3.0 Session Bean question

    Hi there,
    How'd I expose a method of Stateless Session Bean in EJB 3.0? I don't seem to find any annotation for that.
    Thanks in advance.
    Saeed

    If you need to expose method implemented in Session bean, you can invoke the method call from within another method called in Client.
    This method has to be defined in the remote interface . The method you are trying to invoke can be defined somewhere else but called in your bean class from within the method definedin the remote interface.

  • May i use the session bean in the jsp

    <%@ page import="sms.EJB.*,sms.UserDetailEJB.*" %>
    <%
    if (request.getParameter("userid")!=null && request.getParameter("password") !=null && request.getParameter("userLevel")!=null)
    UserHome userHome look up...
    UserLocal userLocal;
    userLocal = userHome.create(userid,password,userlevel);
    %>
    <html>
         <head>
              <title>Insert One Page</title>
         </head>
         <body>
         <form action="/testing/insertOne.jsp">
              <h1 align="center">Insert into User Database !</h1>
              <table align="center">
                   <tr>
                        <td bgcolor ="#FFFCCC">User Name :</td>
                        <td bgcolor ="#FFFCCC"><input type="text" name="userName" size="12" maxlength="12"></td>
                   </tr>
                   <tr>
                        <td bgcolor ="#FFFCCC">Password :</td>
                        <td bgcolor ="#FFFCCC"><input type="password" name="password" size="12" maxlength="12"></td>
                   </tr>
                   <tr>
                        <td bgcolor ="#FFFCCC">User Level :</td>
                        <td bgcolor ="#FFFCCC"><input type="text" name="userLevel" size="12" maxlength="12"></td>
                   </tr>
              </table>
              <p align="center"><input type="submit" name="submit" value="add it"</p>
         </form>
         </body>
    </html>
    May i use the session bean like this, if i dont want to use the data access object
    may i use this...

    Hey it apperars to me like heero82 is using session facade and all he has to do is use session bean to make one business call on session bean. Now if u say it is not correct then i would like to know the better way to doing so.
    I can imagine one ways is use business delegate. Just make new of java class in jsp and let that java class do lookup and delegate the call to session facade.
    Let me know inpout on this
    pranav

  • Trying to use Process Control in session bean

    Hi,
    In Workshop, I have a session bean that is <i>trying</i> to call a method on a business process control. (The control was created in a process project and then moved to a control project to make it visible.)
    The problem, in the example below, is that 'myControl' never gets set. So how do we access controls in EJBs? (I thought there was some Workshop magic that would implement this initialization.)
    Thanks for any help!!
    - Rob
    // Event.ejb
    * @common:control
    private controls.getEventsPControl myControl;
    * @ejbgen:remote-method
    public String getEvent() {
    return myControl.getEvent();
    }

    We're running SP4. Here's the session bean code snippet in a readable format. Again, 'myControl' is null. How do I set it?
    Thanks for any ideas..
    - Rob
    // Event.ejb
    * @common:control
    private controls.getEventsPControl myControl;
    * @ejbgen:remote-method
    public String getEvent() {
    return myControl.getEvent();
    }

  • Calling Enity Bean's business methods from a session bean in EJB 3.0 specif

    Hello everybody,
    Happy to be a member with you in this forum.
    This is my first participation in this forum.
    I have some problem to start with EJB 3.0 specification, I have created an entity bean with some business methods that access a mysql datbase, then i want to create a stateful session bean to provide the client an interface to consume business methods in Enity be
    Please can someone you help me with an example

    @Vladimir Pavlov
    I did not understand what you are trying to convey...
    Whenever an attribute of this bean is modified we want to access that latest value.... Is there any way to know, when the attribute is modified? Just with get/set we can not know, when it is modified... am i right?
    We want to achieve this without modifying the existing source code of the EJB....
    @ Ivo Simeonov
    As of my knowledge, to use interceptors we need to modify the EJB source code, but we do not want to touch the source code....
    All this has to be achieved dynamically when the application is deployed in the production.... is it possible???

  • How to call a web service from a session bean's business method???

    Hi Experts,
    Can anybody help in calling a web serivce frm a session bean's business method??
    Hw do we do that?
    I have one requirement where i want to send emails to set of users for which i have email sending web service ready.. How can i call it thru a session bean's business method???
    Pls help,
    Regards,
    Amey

    Hi Amey,
    You can achieve this using the followin 2 Step implementation:
    1. [Creating a Deployable Proxy|http://help.sap.com/saphelp_nw70/helpdata/EN/2d/b9766df88f4a24967dae38cb672fe1/frameset.htm]
    2. [Create a Client Bean|http://help.sap.com/saphelp_nw70/helpdata/EN/45/029840cf43495195da923f32262911/frameset.htm]
    Hope it helps.
    Regards,
    Alka.

  • Calling session bean's business method through web dynpro component

    Hi All,
    Can anybody tell me how to call a session bean's methods through a web dynpro WITHOUT java-model or web service model ??
    I have following scenario:-
    1. Stateless Session bean having two business methods
    2. Web Dynpro component
    3.Now i want to call business methods without using any model. I have got following piece of code but I dont know how to go about it.
    4.Where do i have to set JNDI name for session bean? which interface will be looked for?
    5. Do I have to declare public part for EJB DC? If yes, how?
    //This is inside web dynpro component
    InitialContext   context = new InitialContext();
    o = context.lookup(JNDIName);
    TestSessionbeanHome homeRef = (TestSessionbeanHome) PortableRemoteObject.narrow( o,                                                                               
    TestSessionbeanHome.class);
    TestSessionbean beanRef = homeRef.create();
    <returnValue> = beanRef.<ejb method name>
    Please help to get a step-by-step approach to this case.
    Thanks and regards,
    Amey Mogare

    Hi,
    If  I comment out the part that is using session bean's business method, DC is building fine.
    And if I uncomment, then compiler is unabl eto resolve business method(s).
    And i would like to mention that my EJB + J2EE App DC is building properly, but it havent yet deployed properly as I am waiting for data-source-alias name prefix to be configured by ERP team. So will this be a reason why Web Dynpro DC is not able to resolve business methods ??
    Because Web Dynpro DC is able to resolved all interfaces of Session bean and entity bean. But when it comes to business method, its not able to resolve.
    Any more ideas why it is not happening?
    Pls help.
    Now i went through some forum posts regarding this and found that we also need to add EJB DC to Java Build Path for WebDynproDC>Properties>Java Build Path.
    I did this and now it is able to resolve business methods and DTOs as well. So to summarize I did following:-
    1. Added EJB DC (complete DC) as a Used DC to Web Dynpro DC with Buid-n-Deploy-n-Run time dependency
    2. Added Sharing reference of J2EE application DC to Web Dynpro DC -->Properties
    This reference I constructed as follows:-
    <vendorname>/<name of j2ee application as appearing under display name tag in application.xml (replacing '/' with '~')>
    So my Sharing Reference becomes:- <vendorname>/reqpstapscreqpstapja_reqid
    3. Added EJB DC to Java Build Path in Web Dynpro DC's properties
    4. Then I added following piece of code to get object of SessionBean class
    InitialContext context = new InitialContext();
    Object o = context.lookup("java:comp/env/ejb/SessionRequestIDBean");
    SessionRequestIDHome homeRef = (SessionRequestIDHome) PortableRemoteObject.narrow(o, SessionRequestIDHome.class);
    SessionRequestID beanRef = homeRef.create();
    beanRef.<business method>
    But After doing this I am facing another problem :-
    The build fails saying it is not able find the package for DTOs. But when I see the Component Controller's code it is not showing any red or yellow marks.
    Can anybody pls help me out here?
    Thanks and regards,
    Amey Mogare

  • Update object returned by a business method in stateful session bean

    I have a business method in stateful session Bean returning an Object "myObject getObject()". This object can be modified by the client.
    Is it necessary at the end to notify the bean about the changes with some kind of business method "setObject(Object myObject)"? or
    the client and the bean have the same reference to the object and it isn't necessary?
    Thanks

    When an EJB returns a value, it is serialised across the wire and is effectively lost to the EJB. Any changes to the returned object by the client, will have to be notified by a call on the EJB, as in your post.
    Dave

  • Entity Beans and Session beans to represet Business lOgic

    How cam we implement Entity Beans and Session beans to represent Business Logic.
    Can anyone explain how can we do this.
    Regards...

    I have session beans calling method in entity beans and any client
    doesn't have access to entity beans, only via session beans.
    If i define security policy and method permissions for session beans
    only, do entity beans use that permissions when calling their methods
    from sessions beans OR should i define the security policy for entity
    beans separately?If you want to set the permission on individual
    methods of entity bean ( with different roles)
    you have to do it separately.
    If you want to delegate the Authenticated user along with
    the method call to the Entity Bean you can use
    run-as-identity-principal.
    For more detail please check out the EJB2.0 Spec.
    -utpal

  • No business interface, component interface or web service endpoint interface found for Session Bean SessionEJB

    hi ,
    i am just using EJb in my Application
    just created an SessionBean and with Local interface in it i am getting this wierd exception with weblogic NetBeans and eclipse also
    weblogic.ejb.container.compliance.ComplianceException: No business interface, component interface or web service endpoint interface found for Session Bean SessionEJB
    weblogic.ejb.container.compliance.ComplianceException: No business interface, component interface or web service endpoint interface found for Session Bean SessionEJB
        at weblogic.ejb.container.compliance.SessionBeanClassChecker.checkInterfacesExist(SessionBeanClassChecker.java:177)
        at weblogic.ejb.container.compliance.Ejb30SessionBeanClassChecker.checkInterfacesExist(Ejb30SessionBeanClassChecker.java:27)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at weblogic.ejb.container.compliance.EJBComplianceChecker.check(EJBComplianceChecker.java:331)
        at weblogic.ejb.container.compliance.EJBComplianceChecker.checkDeploymentInfo(EJBComplianceChecker.java:280)
        at weblogic.ejb.container.ejbc.EJBCompiler.checkCompliance(EJBCompiler.java:789)
        at weblogic.ejb.container.ejbc.EJBCompiler.doCompile(EJBCompiler.java:222)
        at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:461)
        at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:428)
        at weblogic.ejb.container.deployer.EJBDeployer.runEJBC(EJBDeployer.java:437)
        at weblogic.ejb.container.deployer.EJBDeployer.compileJar(EJBDeployer.java:795)
        at weblogic.ejb.container.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:683)
        at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1254)
        at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:442)
        at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
        at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
        at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159)
        at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45)
        at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:613)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
        at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184)
        at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
        at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
        at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:207)
        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
        at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
        at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
        at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
        at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
        at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
        at weblogic.ejb.container.compliance.EJBComplianceChecker.check(EJBComplianceChecker.java:321)
        at weblogic.ejb.container.compliance.EJBComplianceChecker.checkDeploymentInfo(EJBComplianceChecker.java:280)
        at weblogic.ejb.container.ejbc.EJBCompiler.checkCompliance(EJBCompiler.java:789)
        at weblogic.ejb.container.ejbc.EJBCompiler.doCompile(EJBCompiler.java:222)
        at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:461)
        Truncated. see log file for complete stacktrace
    >

    Hi Rajendar,
    I think the problem with having empty interfaces, or interfaces without methods for EJBs, is that they don't really make  "sense". After deploying your EJB, a client application will use JNDI or dependency injection to access your EJB.  So in your case it will look something like this
    @EJB
        mytestSSBLocal myejb; //(In this case we are using the local interface)
    In the second step, you will want to do something will your EJB, but since mytestSSBLocal doesn't define any methods, there is nothing you can do with your ejb.
    The Exception is telling you that weblogic couldn't find a complaint interface for your EJB.
    best regards, Nicolas

  • Can Entity Bean with Home Business Method replace Stateless Session Bean?

    Since Entity Bean can have business methods in the Home Interface, can we use Entity Bean with Home Business Methods to replace Stateless Session Bean?
    I am assuming we can get better performance by doing this since the overhead of creating Component Object can be avoided as compared to stateless session beans.

    Requires-new makes the container start a new transaction. Only use that flag
              at the point that you are certain that a NEW transaction should BEGIN. I
              suggest you use Required as your default for all methods in the application,
              and only change that to anything else when you are certain that you should.
              Peace,
              Cameron Purdy
              Tangosol Inc.
              << Tangosol Server: How Weblogic applications are customized >>
              << Download now from http://www.tangosol.com/download.jsp >>
              "A.J,LEE" <[email protected]> wrote in message
              news:3ba5adb2$[email protected]..
              >
              > I find it result in "dead lock"
              > when I call RequiresNew attributed CMP method in session Bean.
              > Then, Is it possible to use CMP which is set with "RequiresNew"
              transaction attribute?
              >
              > I Wonder why.
              >
              > Thanx in advance.
              

  • Newbie question: Can't see session bean in business operations after deployment

    Hi,
    I've just deployed a session bean (using WLS 7.0) sucessfully, but I can't see
    the deployed EJB in the business operations in studio. Am I suppose to update
    something on the integrator side that references the EJB? Or is there something
    else? Any help would be greatly appreciated.
    Thanks
    Aashish

    Hi,
    Sorry, but I don't know what you mean.
    Could you explain it more detailed, please?
    I see following, when start integrator.bat:
    [code]
    Developer 4.7 Build 999
    Exception in thread "Thread-3" java.lang.NullPointerException
            at com.wm.app.b2b.dev.DevConnectDialog.itemStateChanged(DevConnectDialog.java:253)
            at javax.swing.JComboBox.fireItemStateChanged(Unknown Source)
            at javax.swing.JComboBox.selectedItemChanged(Unknown Source)
            at javax.swing.JComboBox.contentsChanged(Unknown Source)
            at javax.swing.AbstractListModel.fireContentsChanged(Unknown Source)
            at javax.swing.DefaultComboBoxModel.setSelectedItem(Unknown Source)
            at javax.swing.JComboBox.setSelectedItem(Unknown Source)
            at com.wm.app.b2b.dev.DevConnectDialog.<init>(DevConnectDialog.java:210)
            at com.wm.app.b2b.dev.DevMainFrame.doConnect(DevMainFrame.java:759)
            at com.wm.app.b2b.dev.DevMain$1.run(DevMain.java:195)
            at java.lang.Thread.run(Unknown Source)
            at com.wm.ui.UiFrame$7.run(UiFrame.java:344)
    [/code]
    Thanks.

Maybe you are looking for