Using Work Manager in EJB OC4J 10

Hi
I wanted parallel processing, I have several handler classes(Plain Java classes), which are for different kind of messages. Messages are coming from Queue, to which MDB is listening, MDb is instantiating the Handler class, depending on message type.
I knew in Application Server, we have "Work Manager", which is handling the threads. I want to use those threads rather creating my own threads(which is a bad idea I suppose), and let those threads invoke the handler.
IN OC4J 10g I dint find how to get an instance of Work manager.
But somehow, i managed to get Work manager,
What I did, i previously deployed one Resource Adapter( for some other requirement), Work manager is available to one class of that Resource Adapter, and that Work Manager is available in the start method of JMSRecourceAdapter class.
start() method has BootStrapContext as a paramater, and I get Work manager from this BootStartContext, what i now did, is added Work Manager to one JNDI name.
And in MDB i performing lookup to this JNDi name, and so I get Work Manager, my handlers are implementing Work interface, and I simply call scheduleWork() method of Work Manager and pass my handler as parameter.
I have somoe querie:
Is this right way?
Is there any alternative? to run few handler class parallely from MDB.
How can be Work manager made available in OC4J?
Thanks
Abby

i answer the questions:
Is this right way? No
Is there any alternative? to run few handler class parallely from MDB. creating multiple instances of the MDB.
How can be Work manager made available in OC4J?
I dont think there is any way to make Work Manager available in OC4J

Similar Messages

  • Using work manager for third party connections

    Folks we are trying implement work manager to
    Allthough WL is self tuning, and you could "increase the internal socket pool", you have to fully understand the implications of this.
    -It increases the # of threads, which ultimately degrades performance, due to the amount of context switching which would have to occur (this is at the application layer)... in general
    -It will require additional memory, of which, we'd need to account for this, otherwise, it can run the WL instance out of memory, if we're in a fault condition
    Let me explain this "fault" condition a little further...
    There's a BIG difference between a 3rd party being down, and a 3rd party being able to respond to our request, but unable to process it in a timely fashion (i.e. they're overloaded, or the tcp connection is happening properly, but the application response from the 3rd party isn't properly responding/working in a timely fashion). We've seen this condition on a # of occasions and need to be able to have a max limit or governor on each 3rd party... of which, my understanding of WL work managers allows for this (I do have to note, I am not experienced with these, and my knowledge is only with what I've had time to read on). Ultimately, I'm trying to prevent the condition I've seen in a # of serious "slow downs" or hang-ups within the application... we should NOT be able to have 3rd party calls hamper the performance or availability of our application

    Note that you can reduce the context switching by 'pinning' certain CPUs to handle, for example, the network interrupts.
    You can use (on Linux): cat /proc/interrupts (shows information related to hard interrupts).
    From http://middlewaremagic.com/weblogic/?p=8133
    "In a multi-processor environment, interrupts are handled by each processor. Two principles have proven to be most efficient when it comes to interrupt handling:
    Bind processes that cause a significant amount of interrupts to a CPU. CPU affinity enables the system administrator to bind interrupts to a group or a single physical processor (of course, this does not apply on a single CPU system). To change the affinity of any given IRQ, go into /proc/irq/<number of respective irq>/ and change the CPU mask stored in the file smp_affinity. To set the affinity of IRQ 19 (which in the above example is the network interface card) to the first CPU, we can use echo 2 > /proc/irq/19/smp_affinity."
    To configure a work manager properly, you have to throttle the maximum threads and the capacity. The maximum number of threads are the number of threads
    that are allowed to run simultaneously. Usually, you set this equal to some resource (such as the number of connections in a data source). This to prevent
    contention for that resource (otherwise the thread would be waiting for the resource and thus consuming CPU cycles by polling if can go or not). When the maximum
    is reached no other threads are spawned to run. The request that comes in is put into a piece of work and stays that way until an execute thread comes available
    to process that work. The number of work instances you allow in your heap can be set by the capacity constraint (which thus throttles the memory consumption).
    When the capacity is reached, new requests are rejected.

  • Work Manager 6.0 Hide Menu Options

    Hi Community.
    we are trying to hide some options from Work Manager 6.0 menu. We know how to hide timesheets, but we need to hide work orders function (See Screenshoot). Anyone knows how to hide them without Agentry project modification? the specific requirements is to use work manager only for notifications. We want to keep the standard application.
    Thx All.

    Jason,
    Thx for your answer. I dont want to change the agentry work manager code, i mean about adding new rules or new logic. For example to hide the timesheets button we found a work around changing some parameters on ERP Config Panel without work manager code changing (See screen 1). Also you can see an existing rule on workmanager.
    Anyway if the only way is changing the work manager code, we will do it.

  • Upgrading work manager 5.3 to 6.1 with out SMP 3.0

    Hello Experts,
             As per the blogs and posts, work manager 6.0 is designed for SMP 2.3 and work manager 6.1 for SMP 3.0.Can we use work manager 6.1(with its additional features)without SMP 3.0 similar to work manager 5.3.Can we have standalone work manager 6.1 server or we need to install complete SMP 3.0 runtime .
    Please suggest can we upgrade work manager 5.3 to 6.1 without SMP 3.0 to have standalone Agentry server for work manager 6.1(Like standalone server for work manager 5.3)
    Thanks in advance
    Thanks & Regards,
    Sravanthi Polu

    Hi Bill,
    Thanks for your reply.What about the customization's done in Work Manager 5.3, will they have impact when we upgrade from 5.3 to 6.1 on SMP 3.0.What is the better approach to retain the custom logic if we go for upgrade(SMP 3.0).As per my knowledge if we go for 6.1 on SMP 3.0, then custom logic need to be implemented again, so considering customization's as higher priority, can we migrate existing Work Manager 5.3(With custom logic(Editor,Java,ECC Changes)) to SMP 3.0.If we migrate custom logic would be retained,but can we make use of the new features in SMP 3.0  like open ui,client branding .... etc.
    Please help in this regard.
    Thanks in advance.
    Regards,
    Sravanthi

  • Work Manager API in Sun Java Application Server 8.1

    I am trying to build a parallel application using Work Manager api (javax.resource.spi.work.WorkManager;)
    I studied the Websphere implementation of WorkManager there you need to make JNDI lookup for work manager and then use it to submit the work.
    My question is if i make class which will implement the javax.resource.spi.work.WorkManager; interface and use that class to submit the work and execute it in parallel then will that class will handle the resource management and all j2ee services
    Do we have separate implementation of work manager API for Sun Java Application Server 8.1 (any jar like asynch.jar in IBM websphere) so that we will just create a work manager using admin console and make JNDI lookup and use it
    Please guide me

    Before I start, disclaimer -- I have no knowledge of Hibernate and the following comments are based on the stack trace you have included.
    I think your permissions might be set all right but you might have an error in the hibernate query. It looks like hibernate uses antlr to parse the queries. While parsing the query, antlr is encountering an exceptional condition and is trying to exit the VM (by calling System.exit()). Obviously, the hibernate code does not have that permission and therefore the exception is logged.
    My guess is if you fix the query such that hibernate/antlr can parse it, you will not run into this error.
    Hope this helps,

  • How to  declare worker manager when using ejb-gen (weblogic 9.x)

    I want to declare a local worker manager for one of my application.
    My ejb-jar.xml file is generated with ejbgen, and I can't find anything related to worker manager declaration in ejbgen documentation
    Is it possible to achieve this configuration requirement ?
    Thanks.

    Hi,
    Create a WorkManager from AdminConsole with name *"MyWorkManager"*. then add the following Annotation in your EJBGen Ejb.
    Try the Annotation Like this:
    import weblogic.ejbgen.Session;
    @Session( <font color=red><b>dispatchPolicy = "MyWorkManager"</b></font>, ejbName = "TestSB")
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)

  • How to use application managed entity manager in EJB?

    I finish reading The EntityManager Interface in JEE tutorial.
    I know I can use container manager entity manager in EJB, but I want to explore how to use application managed entity manager in EJB.
    Can I use application managed entity manager in EJB (container management JTA transaction is used)? Where do I should close entity manager if can?
    The following is an example from JEE tutorial, but didn't find where to calose entity manager. and can I create mutiple EntityManagerFactory objects and Entity Manager objects to use them in a JTA transaction?
    @PersistenceUnit
    EntityManagerFactory emf;
    EntityManager em;
    @Resource
    UserTransaction utx;
    em = emf.createEntityManager();
    try {
      utx.begin();
      em.persist(SomeEntity);
      em.merge(AnotherEntity);
      em.remove(ThirdEntity);
      utx.commit();
    } catch (Exception e) {
      utx.rollback();

    Seems like a very poor example, the whole power of EJBs is to use Container Managed Transactions so you don't NEED to manage the transaction and the entity manager yourself. What you posted is code I would expect in a non-JEE application, or in a piece of code which requires fine-tuned transaction boundaries such as batched data importing logic.
    If I were you I'd research JPA in steps.
    a) learn about JPA as an API outside of the scope of EJBs (recommended reading: the book 'Pro JPA 2')
    b) learn about Container Managed Transactions in EJBs
    c) learn about Bean Managed Transactions in EJBs
    Right now you're rushing into c). I can understand that it raises many question marks at this point.

  • Can a use a partitioned external hard drive to create a disk image? I tried, doesn't seem to work using disk manager.

    Can a use a partitioned external hard drive to create a disk image? I tried, doesn't seem to work using disk manager.

    OK, it's very bad computing to use a backup disk for anything but a backup. The reason being is if/when the HD crashes you will have lost not only all your backup but the data files. While I commend you for wanting redundant backup, you really need separate EHDs for doing so. Format each EHD using Disk Utility to Mac OS Extended (Journaled) using the GUID parttition. When you connect, OS X will ask if you want to use that drive as a Time Machine backup drive, select yes and then let it backup. On the second EHD format the same way however do not use TM as a backup, this time I'd suggest an app such as SuperDuper or Carbon Copy Cloner to make a clone of the internal HD. Leave both EHDs connected and TM will backup new or changed files automatically on a hourly basis. The clone you will need to set to backup on the schedule you want. For example I have my SuperDuper EHD set to backup only changed or updated files at 2AM every day.
    The advantage of a clone is that if the computers internal HD crashes you can boot from a clone and continue working, TM will not do that but it's great for keeping an archive of all files. So if you want a version of a file from many months ago, TM will help you locate and restore it.

  • How to use a work manager dedicated for an URI

    Hello,
    I have a servlet able to manage different use cases, based on differents URI (the servlet is mapped on /*, and depending of the URI and the configuration, I do different work)
    I would like to set a workmanager on each of my use cases.
    Is it possible to set a workmanager on a use case without any update of the descriptor files ? (without multi mapping the servlet because my use cases are pluggables)
    I've seen it is possible to acces a workmanager programaticaly (commonJ work managers) but it seems to be mandatory to reference the commonJ work manager inside the web.xml file to allow loca JNDI lookup on this work manager. Thus If I add a work manager, I have to update the web.xml. There is another possibility without updating any deployment descriptors ?
    Thank you very much for your answers,
    Best Regards,
    C.

    James,
    thank you for your update.
    1) Concerning the first solution (CommonJ WM), it sounds good for my needs but I still have to update the web.xml to add the resource-ref to access the WorkManager by JNDI:
    <resource-ref>
        <res-ref-name>wm/TestWorkManager</res-ref-name>
        <res-type>commonj.work.WorkManager</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>So I have to update my ear, it is not exactly what I want :(
    2) Concerning the deployment plans, it is also a good idea, I can multiinstance a servlet to use different mapping and then apply different workmanager for different uris,
    This is working. I update the web.xml using a deployment plan.
    The only negative point is I can't only apply the deployment plan but I have to redeploy the entire application (wich is not recommended for production because it occurs a out of service period)
    Do you know any solutions for this two points ?
    Thank you a lot
    Best regards,
    C.

  • Work Management- how to use it?

    How can I define a work manager?
    in j2ee documentation i found that i can use it using someting like that
    InitialContext ctx=new InitialContext();
    Context envContext;
    envContext = (Context)ctx.lookup("java:comp/env");
    WorkManager wm=(WorkManager)envContext.lookup("wm/TestWorkManager/");
    my problem is that in don't know how to define it and where
    The documentation provided here does not help me enough...http://download-west.oracle.com/docs/cd/B31017_01/web.1013/b28956/workcont.htm
    thank you in advance!

    The Work Manger refered in the Oracle documentation is part of the JCA contract between an application server and a resource adapter. So this Work Manager is only available for a JCA 1.5 resource adapter implementation.

  • My photos are not printing right with adobe manages color but works when i use printer manages color. never had any issues untill a week ago.

    my photos are not printing right with adobe manages color but works when i use printer manages color. never had any issues untill a week ago.

    We use CS6, yes we calibrate using x-rite. I have always had adobe manage colors when printing. This problem just occurred, all my settings are the same as they have been for years. The only thing we did lately is do an update to CS6. We thought it might be our printer but when we use the printer manages color it works fine, The problem with adobe manages color is it is not blending the light highlights like on top of the cheeks with the colors around the cheeks  and its putting a faint red between the two it just does not have a smooth transition. I printed a photo that I had printed 4 months ago with no issue, and this time it had the issue that I am dealing with now. Somehow the photo shop manages color is not getting the right info to my printer.  
    I set paper type
    set quality
    no color adjustment
    set my profile
    Teri

  • Log in option using Work Group Manager to see all network users

    I am getting different login options with my network of 20 iMacs, yet they are all set-up the same way using WorkGroup Manager. I would like the option of having all of the user names displayed on the login screen. I work at a small high school, and this just saves me time and pain. All of these iMacs are a member of the same group, and they all have the same login settings. Any thoughts or ideas are greatly appreciated. Thanks in advance.

    Workgroup Manager or more precisely MCX manged preferences are not really supported for Mavericks running Macs but are for Mountain Lion and earlier.
    Looking at your example screen captures it looks like the working one is Lion or Mountain Lion, and the non-working one is Mavericks which would be consistent with the above explanation.
    The recommended way of pushing settings like this now is to use Profile Manager which supports Mavericks and Lion/Mountain Lion clients.

  • How can I use Data Source Explorer to connect soap service with my work manager project?

    Hello,
           I am new in Agentry and I want to Consume soap service in work manager project.For that I add my service in data source explorer but I dont have any Idea that how can I go further in that to use this service in my project.

    Are you consuming OData service or SOAP service ?  Your heading says something but looking at screen it is OData service.
    I have not worked on OData service in Agentry but hopefully you can figure out rest of the steps:-
    Here are some high level steps you can follow  depending on what your trying to do.
    1. Open "Data Source Explorer" view->Eclipse, select "Window/Show View/Other->"Data Management/Data Source Explorer"
    2. On "Data Source Explorer" view, ->"OData Connections"->right click and select "New...
    3. Enter name of the connection profile.
    4. Enter Service URI of in OData Connection Details
    5. After "Test Connection", press "Finish" or click "Next" to view Summary.
    6. Right click "Yourproject" node under "OData Connection", select connection. You will see "Entities"
    7. Expand "ODataEntities", right click "Entityset", select "Agentry: Connector Studio\Object Wizard for OData".
    8. Select a module to add odata connection, click "Next"; and click "Next"; and click "Next"
    9. Check "Add", "Edit" and "Delete" on "Transaction Selection" screen.
    10. Create your own screenset and platform as required.
    11. Test the changes.
    Thanks
    Manju

  • Using SPML for Identity Management in EJB WebService

    Dear All,
    I have a requirement af using SPML(Service Provisioning Markup Language) for Identity management. Identity management is used to manage the user like deleting a user, modifying, adding a user etc for a application.For that the request for all these functions need to be made using the SPML. The idea is that first the data used to make any request will come from the SAP R3 using an EJB which will retrieve that data by calling a BAPI via JCO and then it is needed to be passed to the entitlement system using the SPML.Thus I have to publish a web service which will get data by calling BAPI and give it to entitlement system using SPML and how can I achieve it?. I have less knowledge about SPML, your guidence will help.
    Thanks & Regards,
    Samir

    There is a document on the SAP Service Market Place that covers the SPML in the UME APIs. This quote is from the [UME documentation|http://help.sap.com/saphelp_nw04s/helpdata/en/5b/5d2706ebc04e4d98036f2e1dcfd47d/frameset.htm]:
    SPML Support
    The UME APIs support access using the Service Provisioning Markup Language (SPML). For more information, see service.sap.com/security > Security in Detail > Secure User Access > Identity Management > SAP Identity Management APIs.
    -Michael
    Edited by: Michael Shea on Jan 17, 2008 9:01 AM

  • Using Jboss Seam in an OC4J

    Good morning everyone, i need some help because i've tried to use the jboss seam framework in a web app to run in an OC4J server using jdeveloper 10 and when i execute the start page i get the following stack trace:
    GRAVE: [current-workspace-app] Se ha producido un error al desplegar el módulo EJB: com.evermind.server.ejb.exception.DeploymentException: [current-workspace-app:registration_model_0]: No se ha especificado ningún <around-invoke> ni ninguna devolución de llamada del ciclo de vida para el interceptor org.jboss.seam.ejb.SeamInterceptor.
    com.evermind.server.ejb.exception.DeploymentException: [current-workspace-app:registration_model_0]: No se ha especificado ningún <around-invoke> ni ninguna devolución de llamada del ciclo de vida para el interceptor org.jboss.seam.ejb.SeamInterceptor.
         at com.evermind.server.ejb.exception.DeploymentException.missingAroundInvokeOrCallback(DeploymentException.java:158)
         at com.evermind.server.ejb.deployment.InterceptorDescriptor.verifyCallbackSet(InterceptorDescriptor.java:148)
         at com.evermind.server.ejb.deployment.InterceptorDescriptor.parseEJBJarXML(InterceptorDescriptor.java:137)
         at com.evermind.server.ejb.deployment.EJBPackage.parseInterceptors(EJBPackage.java:669)
         at com.evermind.server.ejb.deployment.EJBPackage.parseEJBModule(EJBPackage.java:506)
         at com.evermind.server.ejb.EJBPackageDeployment.parseMetaData(EJBPackageDeployment.java:960)
         at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:832)
         at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:217)
         at com.evermind.server.Application.setConfig(Application.java:439)
         at com.evermind.server.Application.setConfig(Application.java:340)
         at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1853)
         at com.evermind.server.ApplicationServer.initializeDeployedApplications(ApplicationServer.java:1608)
         at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:990)
         at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:131)
         at java.lang.Thread.run(Thread.java:595)
    07/06/25 09:36:57 ADVERTENCIA: Application.setConfig Application: current-workspace-app is in failed state as initialization failed.
    java.lang.InstantiationException: Error initializing ejb-modules: [current-workspace-app:registration_model_0]: No se ha especificado ningún <around-invoke> ni ninguna devolución de llamada del ciclo de vida para el interceptor org.jboss.seam.ejb.SeamInterceptor.
    25-jun-2007 9:36:57 com.evermind.server.ServerMessages warningApplicationInitializationFailed
    ADVERTENCIA: Excepción al inicializar la aplicación desplegada: current-workspace-app. Application: current-workspace-app is in failed state as initialization failed
    Ready message received from Oc4jNotifier
    I think that i need an extra descriptor in some xml, i've looked the Jboss documentation and they say that it's independient of the server and they only know the current setup for Jboss, i hope you help me with this, Thanks

    i answer the questions:
    Is this right way? No
    Is there any alternative? to run few handler class parallely from MDB. creating multiple instances of the MDB.
    How can be Work manager made available in OC4J?
    I dont think there is any way to make Work Manager available in OC4J

Maybe you are looking for

  • OS X 10.3.9 and Toast 5.2.3

    Switched systems on my PowerMac G4 from OS 9.2.2 to OS X 10.3.9 and Toast 5.2.1 (and 5.2.3) "unexpectedly quits" when accessing the CD drive. These Toast versions are supposed to be good with both systems. I have tried everything I can think of - re-

  • Diplaying region content based on multiple selection lists

    Hi, I have 3 select list on submit(P1A, P1B, P1C). And i have 3 report regions. now this is the scenario. the 3 select lists are on submit. the P1C is a dynamic list which shows contents based on the selection from P1A and/or P1B. so this is how my P

  • What the mechanism of the Java Proxy for Web Services in WLS 8.1

    Hi, all; I try to find out how the java proxy of web service in weblogic server 8.1 works. Suppose I use the java Proxy of a WebSerice in a client application whatever whithin or outside the application of the web service, does the proxy actually: 1.

  • How can I remove the admin credentials when starting an application?

    Hello everyone! We have changed all the City use of computers. Before, everybody was local admin and today they are standard user. The process is not finished but well advanced. I had a few problems but all went quite well. One of the remaining bugs

  • Color fill in Adobe "Flash" CC

    In Adobe Flash CC (CS 5.5-6) how do you use pen and do a color fill on a random shape you created?