MDB gets cannot find recently created Entity Bean

I have a session bean that creates several entities beans, and puts a message onto
JMS queue. A MDB is configured to read the queue, and in onMessage(), it calls
findByPrimaryKey() for one of the newly created EntityBeans. However, the entity
bean cannot be found.
All of the beans in question are using container managed transactions, and all
have transaction required. The entity bean that I'm looking for is using optimistic
concurrency. I cannot change it to exclusive without redesigning a major part
of the system, which have solved a similar problem that I encounted earlier that
did not involve any message driven beans.
The only way that I got it to work is put in Thread.sleep(5000) right before calling
the finder. Does anyone know of any alternatives besides having the MDB sleep?

No, this will work fine with the existing server. If the publish is
part of the JTA transaction, then no one can consume the message until
the original JTA transaction has committed.
-- Rob
Rajesh Mirchandani wrote:
XA defines that a transaction's individual operations will either fail or
succeed atomically. XA can not, and does not define that a transaction's
individual operations occur exactly simultaneously.
The WL transaction monitor does not currently provide a way to serialize a
transactions commit operations on its component resource managers.
There is an enhancement filed for this, I guess. Follow up with BEA support.
Rob Woollen wrote:
Vina Wang wrote:
The JMS send is part of the transaction, sort of. The call is within
the session
bean transaction, but I'm not using transacted session for
JMSPulisher. Would
that fix the problem?Sadly this is a confusing aspect of JMS. You want a non-transacted
session because you want it to participate in the global transaction
that the EJB started. Also, make sure that you've enabled user
transactions on your connection factory.
There's more info here:
http://edocs.bea.com/wls/docs70/faq/jms.html#252635
Let us know if you're still having problems.
-- Rob
I know that the transaction hasn't been commited, but I was monitoring
database
via SQL call when I tried this. There was about 2 second delay on my
development
machine.
Rob Woollen wrote:
My guess is the MDB is receiving the message before your "create entity
bean" transaction has committed. Is the JMS send part of the "create
entity bean" transaction? It probably should be.
You can easily prove this by writing a few lines of JDBC to hit the
database and check for your primary key.
I would not recommend changing to exclusive or using the Thread.sleep.
-- Rob
Vina Wang wrote:
I have a session bean that creates several entities beans, and putsa
message onto
JMS queue. A MDB is configured to read the queue, and in onMessage(),
it calls
findByPrimaryKey() for one of the newly created EntityBeans. However,
the entity
bean cannot be found.
All of the beans in question are using container managed transactions,
and all
have transaction required. The entity bean that I'm looking for is
using optimistic
concurrency. I cannot change it to exclusive without redesigning a
major part
of the system, which have solved a similar problem that I encounted
earlier that
did not involve any message driven beans.
The only way that I got it to work is put in Thread.sleep(5000) right
before calling
the finder. Does anyone know of any alternatives besides having the
MDB sleep?
Rajesh Mirchandani
Developer Relations Engineer
BEA Support

Similar Messages

  • Finder  method in Entity bean

    how many Finder method in Entity bean i can write ?
    look below...
    public Account findByPrimaryKey(AccountPK key) throws FinderException,
    RemoteException;
    public Enumeration findByOwnerName(String name) throws FinderException,
    RemoteException;here 2 finder methods are there.......i am asking how much freedom i have ? can write as many as finder method i wish ?
    say, findXXXX() ?

    my problem is on the signature of the find
    method.
    OK let me ask you some other way.
    java DOC says
    Each enterprise Bean has a home interface. The home
    interface must extend the javax.ejb.EJBHome
    interface, and define the enterprise Bean type
    specific create and finder methods (session Beans do
    not have finders).
    look it says " finder methods "....right .
    so i want to ask 2 question about this phrase . PLZ
    do confirm me whether i am right or wrong.
    fact 1. finder methods means you can write
    any method name which starts with word find
    and ONLY find
    Example: findABCD( ) , findEFGH(),
    findBLAHBLAH()...any thing starts with find[i]
    are called finder methods...others are NOT.
    is This fact correct ?
    Yes.
    fact 2. Is not it Strange that i need to
    append some letters after the word find to
    get a finder method name !! why not wrting a simple
    method name ( say abcdfgrty () instead of
    findXXXX() which will do the job ??You can... but it has to be called form a findXXXX() method :)
    As such there is no problem in writng a
    find_ANY_WORDS_HERE() to get a finder method but
    problem is why i need to stick to the word
    find and append some words after it
    t to get a finder method ? if i had to do it
    seriously then whats the role of the container ? how
    w it is linking ?Once someone takes the pain of going through the EJB specs, he would not have a problem. Imagine each vendor using his own brains and the developer getting bugged with new features in each AS. EJB specs are flexible enough already :)

  • Creating entity beans with auto numbered primary key

    I have two entity bean with a CMR between them. I am successfully creating the first one but when I try and create the child entity bean I get a NullPointerException.
    Now I think this is because the gernerated code tries to get the primary key of the created entity bean and this is not set as it is set using a auto number in the database (An oracle sequence and trigger).
    Is there anyway i can get round this problem?
    Thanks in advance,
    Adrian

    This is the auto generated code:
         public dmd.sync.ejbs.entity.AppliancePackInfoLocal create_Local(dmd.sync.dataobjects.dto.AppliancePackInfoDTO appliancePackInfoDTO, dmd.sync.ejbs.entity.AmppLocal amppLocal) throws javax.ejb.CreateException, java.rmi.RemoteException {
              BeanO beanO = null;
              dmd.sync.ejbs.entity.AppliancePackInfoLocal result = null;
              boolean createFailed = false;
              boolean preCreateFlag = false;
              try {
                   beanO = super.createBeanO();
                   dmd.sync.ejbs.entity.AppliancePackInfoBean bean = (dmd.sync.ejbs.entity.AppliancePackInfoBean) beanO.getEnterpriseBean();
                   preCreateFlag = super.preEjbCreate(beanO);
                   bean.ejbCreate(appliancePackInfoDTO, amppLocal);
                   Object ejsKey = keyFromBean(bean);
                   result = (dmd.sync.ejbs.entity.AppliancePackInfoLocal) super.postCreate_Local(beanO, ejsKey, true);
                   bean.ejbPostCreate(appliancePackInfoDTO, amppLocal);
                   super.afterPostCreate(beanO, ejsKey);
    It must be falling over on the last line as it calls the ejbPostCreate fine.

  • Error: Cannot find or create the font '0, Bold'...

    I get this error when I try to open a .pdf file that someone sent to me. "Cannot find or create the font '0, Bold'. Some characters may not display or print correctly."
    I use gmail and can view the file but as soon as I save it or try to print it and adobe reader opens the file I can't see the any of the letters just lines of dots where the text is supposed to be.
    I did a quick search to see if there was already something in the forums or on the web but didn't find anything right away. I would like to print the file so any help would be much appreciated. Thanks.

    Sounds like the file is corrupt. Try contacting the file's creator.

  • Acrobat 8.1.2 Pro: Cannot find or create the font 'Arial'.

    I have two workstations both running Acrobat 8.1.2 Pro, both have the font Arial installed and working just fine in other applications.
    I have a pdf file from a customer which opens fine in one workstation, the other workstation gives the following error and shows all text in the pdf as "dots".
    Cannot find or create the font 'Arial'. Some characters may not display or print correctly.
    I've Googled "Cannot find or create the font" and find this problem has been reported in Adobe forums and elsewhere in several previous versions of Adobe Acrobat. Nowhere is the problem resolved... most responses suggest the font Arial is not installed which is not helpful as the Arial font is indeed working fine in other applications.
    Windows XP/ Adobe CS3 / Adobe 8.1.2 Professional
    Thanks,
    SC

    I am having the same problem Sam is. I only see dots in my document and received the same error mesage only I was using a different font. The font is installed on y system and usable in other documents.
    I tried to change the font (dots) to a different font but received an error messge stating the change could not be done because the "chosen font and the font encodings in the document differ and could not be resolved"
    Please help!
    Thanks so much!

  • ITunes cannot find or creat iTunes folder

    I just put in a new motherboard and had to repair my windows and iTunes will not start. It gives me a message that it cannot find or create the iTunes folder in the My Music folder. It was there so I moved it and removed the iTunes software and reinstalled it. It still gives me the same warning that it cannot find or create the folder

    Perhaps this Apple KnowledgeBase article will help:
    iTunes for Windows XP: "Disk is locked" or "iTunes folder cannot be found" when installing or opening iTunes
    Good luck.

  • Error Message:"Cannot find or create the font 'WP-MathA'. Some characters may not display or print correctly."  Who can help me solve this problem?

    Some of the pdf files I work with (receive) come up with a comment: “Cannot find or create the font ‘WP-MathA’. Some characters may not display or print correctly.”  Who can help me solve this problem?
    Thank you in advance for  your time.
    Marlen

    Hello Anubha,
    I am having a similar problem on my machine.  I was using Word 2008 and I created a PDF inside Word.
    I am opening the file on the system itself and I am running Windows 8.1.  I am using Version 11 of Reader.
    When the PDF I created (my resume) attempts to open, it says:  cannot find or create the file Times, Bold.  Some characters may not display or print correctly. 
    However, the entire Reader keeps freezing and will not allow me to open or test print the document.  Also, it is not displaying any of the Bold Times New Roman Print.  Can you please help?  Thanks.

  • Failure to create entity bean with CMP2 under JBOSS + Postgresql

    I have written a simple jsp programme using JBOSS 4 DR2 with postgresql 7.3.3 whereby a simple entity bean could be created into a table in the postgresql 7.3.3 table. However I kept getting the exception message [ javax.ejb.CreateException :Erro checking if entity exists:java.sql.SQLException: ERROR:parser:parse error at or near "=" at character 39 ]
    I have even examined the logfile created under the cygwin postgresql , the log output record produce the error FATAL : unsupported frontend protocol ,with next line read [ERROR:parser:parse error at or near "=" at character 39 .
    I have no idea why this is happening? The postgrsql 7.3.3 was run under cygwin using the command: pg_ctl start _D {data directory} -l logfile -o "-p 5432"
    My guess is that this may not be the Jboss-postgresql data source configuration error since I am able the verify the existence postgresql jndi ,datasource and connector service under the jboss console.Somehow it just got something to do with the jsp programme in the way it was written may be ? But it should not pose a great problem, since i am trying to create a simple entity bean only.
    By the way the entity bean creation statement is home.create("123"),to further verify that the home & remote interface was working ,I have the object context printed out before the creation, and it appeared OK.
    Thanks in advance for those willing to help me to resolve the issues

    I have managed to get the debug from the postmaster , it all boils down to the query [SELECT COUNT(*) FROM {TABLE} WHERE ={CMP FILED}="123"] , the = sign after the 'WHERE' responsible for the failure , but I am still puzzle why it would happen as such?
    Any helper ?
    Thanks

  • How to get updated and recently created events from google calendar in pl/s

    Hello
    I am able to get Google calendar events using pl/sql..I am receiving huge xml code(if there are more events),want only update and recently created events instead of getting repeated events.please help me in this regard.
    Thanks

    From the Google Calendar API online documentation:
    "Retrieving an event again
    If you want to retrieve an event that you've retrieved before, you can improve efficiency by telling Calendar to send the event only if it has changed since the last time you retrieved it."
    http://code.google.com/apis/calendar/data/2.0/developers_guide_protocol.html#RetrievingCached

  • PLEASE HELP!  Problems creating Entity Bean

    Hello,
    I've created an Application Client in order to access an Entity Beans via a Session Bean. Whilst creating the "Language"-Bean via the Remote Object the size of the error log is growing very fast (in a few minutes up to 500 MB) and the SUN minor code 1015 is thrown.
    Does anyone know what to do? I've spent now nearly 2 days in order to solve the problem and I'm really despaired.
    Thanks in advance.
    Beate
    The Session Bean contains the following code:
    try {
    javax.naming.Context jndiContext = new InitialContext();
    LanguageHome languageHome = (LanguageHome) jndiContext.lookup (LANGUAGE_JNDI);
    LanguageRemote languageRemote = languageHome.create(languageHashtable);
    catch (NamingException ne) {
    System.out.println("in NamingException in createLanguage");
    throw new CreateException(ne.toString());
    catch(RemoteException re){
    System.out.println("in RemoteException in createLanguage");
    throw new CreateException(re.toString());
    The error log contains the following error text:
    org.omg.CORBA.OBJ_ADAPTER: vmcid: SUN minor code: 1015 completed: No
         at com.sun.corba.ee.internal.POA.GenericPOAServerSC.preinvoke(GenericPOAServerSC.java:352)
         at com.sun.corba.ee.internal.POA.ServantCachePOAClientSC.initServant(ServantCachePOAClientSC.java:100)
         at com.sun.corba.ee.internal.POA.ServantCachePOAClientSC.unmarshal(ServantCachePOAClientSC.java:91)
         at com.sun.corba.ee.internal.POA.POAImpl.makeObjectReference(POAImpl.java:998)
         at com.sun.corba.ee.internal.POA.POAImpl.createReference(POAImpl.java:1008)
         at com.sun.corba.ee.internal.POA.POAImpl.create_reference_with_id(POAImpl.java:1061)
         at com.sun.enterprise.iiop.POAProtocolMgr.createReference(POAProtocolMgr.java:296)
         at com.sun.ejb.containers.EntityContainer.internalGetEJBObject(EntityContainer.java:1197)
         at com.sun.ejb.containers.EntityContainer.getEJBObject(EntityContainer.java:171)
         at com.sun.ejb.containers.ContainerFactoryImpl.getTargetObject(ContainerFactoryImpl.java:176)

    Hello,
    I found the problem. My Primarykey class had a corrupt "equals" function. I used "==" for a String comparison instead of "equals()". This caused an endless loop.
    Thanks.
    Beate

  • Running Custom SQRs - periodically get 'Cannot find sqr'

    We have set up database-specific folders under ps_home/sqr folder to house our custom sqrs. Periodically, we try to run one of these custom sqrs through Process Scheduler and we get the error message: 'Cannot find sqr' - even though the job parms point to the right folder, security is correct, and the sqr is present in the appropriate sqr folder. The only way we can get Process scheduler to recognize the presence of the sqr is to cycle the servers (the boxes themselves) and delete cache.
    We thought the issue was because developers were editing or copying updated sqrs into the folders while Process Scheduler was trying to run them, but have since found that's not the case. Some sqrs were copied to folders on Friday, servers were cycled and cache was deleted on Sunday and we had the error on Monday morning.
    In all cases, Process Scheduler is running fine and processes other jobs and is only running on one server.
    Anyone else had this issue? Any suggestions would be appreciated.

    IS this happening on a Windows Server box. how many env's (servers like web+app+prcs) are running on the same box. can u describe more about the server box, interms of OS characteristics. there is only one service account on the box right?
    Reasons for the above questions: sqrw.exe is pulled from one environment and is used by other env server too. issue appears when a single admin account on the box cannot share separate memory allocations to the env process scheduler. memory buffer values on the server are insufficient. Tuxedo running on the box needs a bounce to fix the error.Thanks!

  • Hi Im getting cannot find symbol exception.

    Hi Im getting following exception, Plz guide me.
    Cannot find symbol
    Symbol : method getMessage(javax.faces.context.FacesContext,javax.faces.component.UIComponent,java.lang.String,java.lang.object[])
    Location: class com.sun.faces.util.MessageFactory

    Hi I have underline in the following code where im getting exception.
    Plz can any one help me in this regard.
    Cannot find symbol
    Symbol : method getMessage(javax.faces.context.FacesContext,javax.faces.component.UIComponent,java.lang.String,java.lang.object[])
    Location: class com.sun.faces.util.MessageFactory
    if (minimumSet &&
    (converted < minimum)) {
    if (maximumSet) {
    throw new ValidatorException(MessageFactory.getMessage
    (context, component,
    Validator.NOT_IN_RANGE_MESSAGE_ID,
    new Object[]{
    new Double(minimum),
    new Double(maximum)
    } else {
    throw new ValidatorException(
    MessageFactory.getMessage
    (context, component,
    LongRangeValidator.MINIMUM_MESSAGE_ID,
    new Object[]{
    new Integer(minimum)
    }));

  • Im getting cannot find symbol exception.

    Im getting following Exception, Plz guide me.
    Cannot find symbol
    Symbol : method getMessage(javax.faces.context.FacesContext,javax.faces.component.UIComponent,java.lang.String,java.lang.object[])
    Location: class com.sun.faces.util.MessageFactory

    Have you imported all the needed classes?
    That is what it says to do here:
    http://faculty.capitol-college.edu/~jaanderson/JEMT/cannotFindSymbolClass.html
    Also check if the getMessage method in MessageFactory accepts those arguments that you provided (Meybe they are in the wrong order):
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/apidocs/oracle/adf/view/faces/util/MessageFactory.html
    Cheers,
    Illu
    Message was edited by:
    Illu

  • How to create Entity Bean (CMP) using JDeveloper & Weblogic

    Hi,
    Using : JDeveloper9i (9.0.2.829)
    When i am inside the EJB Wizard (Step 1 of 3), the input field 'CMP Provider' shows only Oracle9iAS CMP Provider.
    How should i make my entity take 'Weblogic' as CMP provider for my beans using JDeveloper. I have my tables in Oracle personal db. I was able to succesfuly add a Weblogic/Db connection under respective connections node.
    Should i need to do something more so that i am given an option of choosing Weblogic as CMP provider.
    thanks for the advance help
    regds
    srikanth

    Currently there is no specific option for WebLogic CMP provider.
    You need to manually add the WebLogic CMP deployment descriptor to the project containing
    EJB Entity beans and deploy to WebLogic.
    raghu
    JDev Team

  • Creating entity beans (EJB3) from xml schema

    Dear friends,
    I have a XML schema.. and I want to implement an Enterprise application with EJB3 Entity Beans exposed through a set of JAX-WS Web-Services...
    question: how to define the entities from the XML schema?

    Two alternatives:
    1) JAXB 2.0 generates POJOs with JAXB annotations in them. You can take ownership of those POJOs and add Java Persistence API annotations in them by hand. Basically, you will end up having both both JPA and JAXB annotations in the same Java class. You can then use them in your code both with JAXB APIs and JPA APIs.
    2) Have a look at http://hyperjaxb3.dev.java.net/ It is trying to automate what I described in #1. The project is still not complete, so right now, you may have to hand code the JPA annotations.
    Sahoo

Maybe you are looking for

  • IPod touch users offered UK nationwide Wi-Fi with The Cloud

    *Check this out:-* http://www.thecloud.net/page/3653 (iPod touch users offered UK nationwide Wi-Fi with The Cloud) Sounds quite cool & not too expensive either... Extract:- +Friday, 28 September 2007+ The Cloud today announced that it is giving Wi-Fi

  • Visual editor JSF rendering not working

    Hi, I'm trialing the 10.1.0.3EA version of JDeveloper and I can't seem to get the JSF rendering working in the visual editor. I thought that perhaps I'd changed some settings or something so I completely uninstalled and then reinstalled JDeveloper. A

  • Use of MYSQL when installing Business Objects Enterprise XI 3.1

    Hello Team, I am quite new Business Objects and right now I am using Business Objects Enterprise XI 3.1. when installing BO XI 3.1, I was prompted to select the database server to be created. I chose MySQL. Now, I am curious to know the pupose/involv

  • Can Curved Verticals Be Corrected Reasonably Easily In FCE /FCP ?

    A friend has shot some holiday footage using a screw-on wide-angle lens. This of course has resulted in distortion causing vertical lines near the edge of the frame to bend. Is there a reasonably simple way of correcting this using FCE or FCP ? Someb

  • Forms 6i error

    Sir, At run time while executing report it is throughing an under mentioned error: FRM-41211:Integration error:SSL failure running another product. How to restrict the above mentioned error Thanks