Jcom vb-ejb(both stateless and stateful)'s problem

I try the jcom sample on wls7.0sp4,it's ok.(the sample used entityBean)
then,I try the session bean(both stateless and stateful),some problem occur :
<2003/10/29 17:31:54:JST> <Error> <COM> <210000> <IOXIDResolver opNum 5 invoked.
This method is not implemented.>
<2003/10/29 17:31:55:JST> <Error> <COM> <210000> <IOXIDResolver opNum 5 invoked.
This method is not implemented.>
<2003/10/29 17:31:55:JST> <Error> <COM> <210000> <Export of object: examples.ejb
[email protected] barred>
the client vb source :
Set objTemp = GetObject("examplesServer:jndi:ejb20-statefulSession-TraderHome")
//the statement is wrong!!
Set mobjHome = objNarrow.narrowobjTemp, "examples.ejb20.basic.statelessSession.TraderHome")
can anyone help me?
thks!
p.s: the jndi name is correct.

A deployed bean can not be both stateful and stateless. You must specify the session-type in the deployment descriptor. The reason that deployed beans must be either stateful or stateless is that the ejb container must know how to handle them. Stateful and stateless beans have very different life cycles as I'm sure HeadFirstEJB pointed out.
What HeadFirstEJB might have been trying to say is that if you have a no-arg create along with other create methods, you may be able to deploy the bean as stateless in one environment and stateful in another. I can't think of any reason you might want to do this but I suppose there might be some valid reasons out there.

Similar Messages

  • Looking up Identical EJB both locally and remotely

    prior to posting this request, i have read and
    attempted multiple solutions to this problem
    suggested in the forums to no avail.
    if i have the same EAR, which contains both
    an EJB Component and a WAR, deployed to multiple
    servers, is it possible to look up an EJB both
    locally and remotely?
    for instance, on the server performing the lookup,
    EJB A is deployed. i successfully look it up
    via the following call:
    InitialContext context = new InitialContext();
    Object ref = context.lookup(name);
    return javax.rmi.PortableRemoteObject.narrow("EJBA", EJBAClass.class);
    subsequently, i try to lookup the same ejb
    on a remote server by performing the following
    calls:
    Properties environment = new Properties();
    environment.put("java.naming.factory.initial", "com.evermind.server.rmi.RMIInitialContextFactory");
    environment.put("java.naming.provider.url",
         "ormi://remoteserver:23791/application");
    environment.put( "java.naming.security.principal", "user");
    environment.put( "java.naming.security.credential", "password");
    jndiContext = new InitialContext(environment);
    Object ref = context.lookup(name);
    return javax.rmi.PortableRemoteObject.narrow("EJBA", EJBAClass.class);
    however, i either receive an authentican exception, saying "user"
    doesnt have access to allication "application", or a null pointer
    exception int the RMIInitialContext.
    on my local application, i have defined my ejbs in the web.xml
    as defined by the spec. the ejb component is marked as remote="false"
    in my orion-application.xml as well.
    the version of oc4j is 1.0.2.2.1.
    any directinon on this would be greatly appreciated.
    thanks,
    ted rice

    as a follow up to my own question, using a application
    client, outisde of the web application i can
    successfully look up my ejbs locally and remotely.
    however, from within the web application, i constantly
    receive a ClassCastException.
    if no one can tell me how to resolve this, could someone
    let me know if they have in fact looked up the
    same EJB, both deployed locally and remotely, from the
    same web application.
    thanks,
    ted

  • Stateless and Stateful beans.

    Please tell me what are the important differences between stateless, and stateful beans.
    Thanks in advance.

    See this thread
    http://forum.java.sun.com/thread.jsp?forum=13&thread=529706&tstart=15&trange=15

  • Stateless and stateful

    Hi all,
    Can any one give some idea about stateless and stateful in BSP's ?

    Hi,
    All is well explained in
    http://help.sap.com/saphelp_nw70/helpdata/EN/cc/d6eefc28f711d5991f00508b6b8b11/frameset.htm
    and
    http://help.sap.com/saphelp_nw70/helpdata/EN/cc/d6eef628f711d5991f00508b6b8b11/frameset.htm
    Eddy

  • Question about operations allowed in methods of stateless and stateful bean

    Hello,
    Can anyone tell me why ejbRemove and ejbCreate are allowed entreprise beans and resource manager access in stateful session beans and not in stateless session beans?
    Thanks in advance,
    Julien Martin.

    Salut Julien,
    Can anyone tell me why ejbRemove and ejbCreate are
    allowed entreprise beans and resource manager access
    in stateful session beans and not in stateless session
    beans?I'm not sure I fully understand your question, but here is some information that may answer it.
    The user is the one who creates and removes a stateful session bean. The container is the one who creates and removes a stateless session bean. So the user can pass any parameters to the create of a SFSB because he theorically knows what to pass. The container doesn't, and doesn't want to. It just wants to create SLSB to pool them, but it doesn't pool SFSB.
    Maybe it doesn't answer your question. Can you reformulate?
    Kexkey

  • Both nouveau and nVidia driver problems with Stellarium

    Stellarium v0.12.4 with either xf86-video-nouveau 1.0.9-1 or nvidia (latest driver) and an nVidia MCP78S (GeForce 8200) chip usually results in either distorted graphics and sometimes complete system lock-up.
    The nVidia driver is worse, nouveau sometimes works but its a crap shoot. This has been going on for about 2 months now, and I have tested both drivers.
    With nouveau it dumps these boot errors, but works on other software just fine:
    Oct 21 17:17:48 eagle kernel: nouveau E[ PBUS][0000:02:00.0] MMIO read of 0x00000008 FAULT at 0x10022c
    Oct 21 17:17:48 eagle kernel: nouveau E[ PBUS][0000:02:00.0] MMIO read of 0x00000008 FAULT at 0x100230
    Oct 21 17:17:48 eagle kernel: nouveau E[ PBUS][0000:02:00.0] MMIO read of 0x00000008 FAULT at 0x1002e4
    I cannot use the nvidia driver in general because it sometimes causes graphics faults when using Chromium.
    I don't get any other graphics issues other than with Stellarium (and obviously I cannot run google-earth with nouveau either).
    Any ideas on where to start with this problem would be appreciated.

    Thanks for answering!
    Following your advice, I downloaded and installed the latest driver from Nvidia (http://www.nvidia.fr/object/notebook-win7-winvista-64bit-260.99-whql-driver-fr.html). I'm not sure this is the one I updated on the first place since I don't remember when I did it (it was a few months ago, and as I had internet without using wi-fi, I didn't see that much the BSOD, but now that I'm back to wi-fi, the problem occurs often). Until now, no BSOD, but the first problem "Display Driver Stopped Responding and Has Recovered" is still here, and a little bit more annoying since it can occurs while watching some video files (it didn't happen before).
    For the BIOS problem, it was the one described on the link you gave, but no the problem is over. I was just thinking it could be relevant to understand the others problems.
    I'll let you know if the BSOD is (or seems) definitively gone. In the meantime, if someone knows how to fix the problem of the display driver that stopped responding and was recovered, it would be greatly appreciated!

  • EJB and Jdk1.5 problem

    We are trying to migrate jdk 1.4 (wl 8.1) to jdk1.5 (wl 9.1), when we complie Java source code and build EJB ( using Ant/build.xml), we got following error and can not proceed any further.
    [java] /home/fipdev/DeltaOne/newproductimport/ejbcgen/com/leh/deltaone/ejb/business/newproductimport/DONewProductImportAccessor_41o8gs_Impl.java:12: cannot access com.leh.deltaone.ejb.business.newproductimport.DONewProductImportAccessorBean
    [java] bad class file: /home/fipdev/DeltaOne/newproductimport/ejbcgen/com/leh/deltaone/ejb/business/newproductimport/DONewProductImportAccessorBean.class
    [java] class file has wrong version 49.0, should be 48.0
    [java] Please remove or make sure it appears in the correct subdirectory of the classpath.
    [java] extends DONewProductImportAccessorBean
    [java] ^
    [java] 1 error
    [java] Exec failed .. exiting
    [java] Java Result: 1
    49.0 means using jdk1.5 and 48.0 means using jdk1.4, we do use jdk 1.5 in our development server and could verify by
    bash-2.03$ java -version
    java version "1.5.0_06"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
    Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode)
    do you know why?
    Michael Zou

    Much appreciated your reply, I used both Windows and Unix system and Ant to build EJB, both CLASSPATH and PATH are configured to Jdk 1.5 version.
    CLASSPATH=C:\bea\jdk150_06\lib and PATH=C:\bea\jdk150_06\bin, and verify that it is 1.5 not 1.4 version.
    C:\Eclipse_WorkSpace\DeltaOne\ant>java -version
    java version "1.5.0_16"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)
    Java HotSpot(TM) Client VM (build 1.5.0_16-b02, mixed mode, sharing)
    but still getting error, any an idea? thank you again.
    Michael

  • Facebook and Twitter resolution problems in iOS 7.0.3

    Yesterday i updated my iOS to 7.0.3, since the update both my Twitter and Facebook apps have shrunk to the middle of the screen with all the text overlapping.
    i have rebooted iPhone several times and reinstalled both apps and still the problem is the same.
    If anyone could help it would be appreciated

    ya we are having the same problem with one of our iphone 4's.. with ios 7.0.3,  With our other iphone 4 on 7.0.1 we have no problems

  • Re: User Session using ServletSession and Stateful EJB in Cluster

              Sorry , I didn't use WLS 6.0, we use wls 5.1 in production.
              But in Wls 6.0, in some situations , the state of the stateful session bean can be lost. So it's not so reliable. You have to deal with it in the client code. Instead, servlet is a reliable solution.
              In order to test under wls6.0, you can store the handle of the EJBObject in the HttpSession, not in jndi, cos if the instance fails, all its objects will be removed by remaining instances from jndi. In another instance, you get the handle, and try to get the EJBObject.
              In wls5.1, some information like the server url must be embeded inside the handle. But in wls6.0, I don't know how they deal with it.
              I am looking forward to your results
              "Anuj Soni" <[email protected]> wrote:
              >
              >What kind of clustering problems you had with WL6.0 for Stateful session beans ? It will be helpful for me to know before hand.
              >
              >BTW, how were you able to test stateful session beans in a cluster under WL6.0 i.e. were you storing the Handle or EJBObject in HttpSession or did you store it in JNDI ?
              >
              >Thanks,
              >
              >Anuj
              >"Tao Zhang" <[email protected]> wrote:
              >>Although it's very advanced to take advantage of both http session and
              >>stateful session bean replication, but if you rely on the stateful session
              >>bean's state, you will be in trouble. Because the support of stateful
              >>session bean's replication is not perfect in wls6.0. We already chaned
              >>almost all stateful session beans into servlets or entity beans.
              >>
              >>I am not sure about the handle of the EJBObject. I think it should be able
              >>to reconstruct for us otherwise we can't use the handle any more.
              >>
              >>You can do a test. BTW, could you tell me the result?
              >>
              >>Thanks.
              >>
              >>Anuj Soni <[email protected]> wrote in message
              >>news:[email protected]...
              >>>
              >>> Hi,
              >>>
              >>> I am designing the workflow for my web application using a Stateful
              >>session bean. As Weblogic 6.0 supports clustering of stateful session bean
              >>and HttpSession(in-memory replication), I want to use the combination of
              >>both techniques to provide load-balancing and fail-over safety for user
              >>sessions and their corresponding workflows.
              >>>
              >>> The question I have is that, Is Handle obtained using
              >>EJBObject.getHandle(), fail-over safe (for a clusterable stateful bean), so
              >>that I can reconstruct the reference to EJBObject on the secondary server
              >>incase of primary server crash.
              >>>
              >>> My understanding is that I should store Handle in the HttpSession as it is
              >>Serializable not the EJBObject. The weblogic 6.0 document only talks about
              >>the replica-awareness of EJBObject.
              >>>
              >>> If my above assumption is incorrect, Can you tell me how else I can
              >>achieve my goal ?
              >>>
              >>> Thanks in advance.
              >>>
              >>> Anuj Soni
              >>
              >>
              >
              

    Any one tested this scenario yet? i.e: storing the handle to an EJB object and then trying to re-use after the HttpSession is restored?
              Thanks.
              

  • Application deployment order with weblogic-ejb-jar.xml and jndi-name

    I have two applicatation working on Weblogic server v. 10.3.6.
    First of them creating one ejb stateless bean and creates JNDI maping for it (in weblogic-ejb-jar.xml file):
    <weblogic-enterprise-bean>
         <ejb-name>ConfigMenegerBean</ejb-name>
         <stateless-session-descriptor>
         <stateless-session-descriptor>
              <business-interface-jndi-name-map>
              <business-remote>package.ConfigurationSessionRemote</business-remote>
              <jndi-name>ConfigMeneger</jndi-name>
              </business-interface-jndi-name-map>
         </stateless-session-descriptor>
         <enable-call-by-reference>true</enable-call-by-reference>
         <jndi-name>ConfigMeneger</jndi-name>
    </weblogic-enterprise-bean>
    Second appication have to refer for this bean by JNDI using spring been lookup :
    <jee:jndi-lookup id="configManager" jndi-name="ConfigMeneger"/>
    I changed deployment order parameter for both apllication(first=100 and second=500) in order to first app start first and share bean by jndi to another application. Unfortuantelly I got an error :
    javax.naming.NameNotFoundException: Unable to resolve 'ConfigMeneger'. Resolved ''; remaining name 'ConfigMeneger'
    How can I configure deployment order that first application make jndi mapping for bean, before the second application will use it ?

    Ok in a way I have solved my problem (even if I am not completely satisfied by the way on how to proceed...). So thanks to message "JBuilder7.0 and Weblogic6.1" on EJB sun forum :
    http://forum.java.sun.com/thread.jsp?thread=285735&forum=13&message=1255488
    I have tried the following actions (mentionned in the other forum messages):
    - To preserve changes to weblogic*.xml, the safest way is to change the ejb-borland.xml.
    (I am not sure that I have applied this advice correctly, because I suppose that syntax is not similar in weblogic file or borland file).
    And you can MANUALLY update the weblogic file in your JAR archive.
    1. Open the EJB JAR file in Winzip and extract the weblogic-ejb-jar.xml file, so that a copy exists in your
    project directory.
    2. Open this file (in Notepad), add the WebLogic specific information, and then save the file.
    3. Now, when you are finished with the build cycle and are ready to deploy, you may open the EJB jar file
    and swap in the weblogic-ejb-jar.xml file."
    Good Luck.

  • Sending Email using both HTML and plain text

    I could use some advise on how to start researching email for
    both HTML and plain text messages.
    I have a script called class.phpMail.php, but the code is
    alittle advanced for me. Basically I can't get
    it to work on my server and I don't know where to begin the
    learning process here.
    I talked to my provider, "HOST" company goDaddy.com and I was
    told that to connect so that I could send email I would need this
    line of code. They didn't say it should by in my php.ini file but
    that was where I found it.
    SMTP = relay-hosting.secureserver.net
    This is the smtp address that my provider uses to make the
    connection with my mail client.
    I was told that with this line of code I would not need a
    password or username
    I did some further reseach and I found an article that stated
    that my original error:
    Warning: fsockopen() expects parameter 2 to be long, string
    given in ...../php/class.smtp.php on line 105
    was being caused by this code because the $port value needed
    to be between 1 - 65365:
    $this->smtp_conn = fsockopen($host, # the host of the server
    $port, # the port to use ----- "this is line 105"
    $errno, # error number if any
    $errstr, # error message if any
    $tval); # give up after ? secs
    In particular the $port value was coming in corrupted and
    that I needed to cast it.
    I did as they suggested and made it an (int) as they
    suggested.
    $this->smtp_conn = fsockopen($host, # the host of the server
    (int)$port, # the port to use
    $errno, # error number if any
    $errstr, # error message if any
    $tval); # give up after ? secs
    It resolved part of the error message however, the other half
    of the error message is shown below:
    Message could not be sent.
    Mailer Error: Language string failed to load: connect_host
    What exactly is the connect_host they refer to in this
    message?
    Would it be the string in my php.ini file refering to the
    SMTP = relay-hosting.secureserver.net
    I have allot of what I think are disconnected questions as I
    really have just begun to work
    with the mail() function. If anyone has the time to educate
    this newbie into the wonderful
    world of email() I would appreciate it.
    Thank You
    Kevin Raleigh

    Sorry to dig up an old post, but we've spent the last few days trying to work out why an email campaign being sent from BC is going into the Junk folder of recipients that use MS Exchange. We've fixed quite a lot of issues, including the fact that Legacy Templates have random JS injected just before they get sent, so we had to switch to the new template system. We've narrowed the issue down to one of three things:
    1. A missing alt tag on the tracking image that BC drops into the email (pretty unlikely)
    2. The BC Europe IP (54.240.14.45) is blacklisted here: UCEPROTECTL2 (possible, but if you actually look it's not the IP itself, but another IP on the same network, so unlikely)
    3. The fact that the HTML email has no text component.
    I agree, BC is late on this but I think that it needs to be added, even if most users have HTML-ready email clients, spam checkers do seem to prefer multi-MIME emails.
    This is backed up by the following SpamAssassin rule, which we are currently unable to resolve:
    -1.105
    MIME_HTML_ONLY
    Message only has text/html MIME parts
    You should also include a text version of your message (text/plain)
    So in my opinion, BC do still need to add this as a feature, otherwise the system is not viable for our customers and we'll have to look elsewhere.

  • I have partitioned my time capsule, but I can't get it to work as a Time Machine back up and permanent media server for both mac and PC. What format do I need to partition the drive to so that it works for both mac and windows and so that it will be visab

    I have partitioned my time capsule, as I want part of it to act as a media server for both mac and windows. However I don't know what format that I need to partition it to. I also can't make it a permanently accesible drive. I want to restore the drive to the original format (which I don't know) and start again and re-partition the drive in a format that can be used for media by both mac and PC and for time machine back-ups and make the media part of it permanetly accesible so I can add and acccess my files.
    Thanks

    You are mixing up a couple of things here.
    The TC drive cannot be partitioned without removing it.. did you do that?
    If you partition it you must use a Mac disk utility and use the HFS+ ie standard Mac format. And GUID partition table not windows type.
    You can select erase disk in the airport utility.. that will take the disk back to original format. No partitions. TC is deliberately not partitioned as it is not a media server.. it is a backup device for TM. Over time .. the disk will be filled with TM backups so you have a long history of file changes to your computer.
    There is no media server in the TC.. it is merely disk storage.. you can serve files from it to a media device.. but the TC itself is dumb as dumb.
    Now the actual format of the drive is irrelevant to the PC.. The TC offers SMB file services to the network. You can copy files to and from the TC as if it was a local disk without caring one iota about the format. The TC handles that .. it is not a local disk .. it is a network drive.
    Although you cannot partition the TC. you can still copy files to it.. this does have implications for TM.. but as long as there is plenty of free space should not be a major issue.
    You can create a disk image via the disk utility in a Mac.. and as stated you can create partitions if you do it on a Mac with the disk directly connected which means breaking warranty if any exists on the TC.

  • Problem with "package-info.java" using EJB 3.0 and OC4J

    Hi all.
    I already posted this question on JDeveloper forum, but didn't get any answer,
    so I'll try posting here.
    Anyway, I'm new both to JDeveloper and J2EE,
    so I'm trying out examples for EJB 3.0, and I got stuck at "Use Security Annotations with EJB 3.0"
    (http://www.oracle.com/technology/tech/java/oc4j/ejb3/howtos-ejb3/howtoejb30security/doc/how-to-ejb30-security-ejb.html).
    Example code is working perfectly, if one builds it using Ant, but I'm importing all examples into JDeveloper (or at least I'm trying to :))
    JDeveloper can't build file "package-info.java" containing following code:
    @javax.annotation.security.SecurityRoles(roleNames={"superuser", "user"})
    package oracle.ejb30;I'm getting following output in "Compiler - Log" window:
    Error(2,1): 'class', 'interface', or 'enum' expected.
    Help much appreciated...
    platform used:
    Windows XP SP2
    JDeveloper Studio (Version 10.1.3, Build 3412)
    JDK 1.5_06
    OC4J 10.1.3 developer preview 4 (standalone version)

    Since you're using EJBs, you can use JTA and can skip the getTransaction() calls. If you want to use getTransaction().begin() and commit(), then make sure that your EntityManager is resource-local. The configuration for this is in persistence.xml. Set a transaction-type of RESOURCE_LOCAL rather than JTA.

  • Ejb 3.0 and webservices

    Hello everybody?
    Does everybody know if i can create a web service from an ejb 3.0 stateless session inside jdeveloper 10 g 10.1.3 (using a wizard for example)?
    Thank you

    It's almost too easy to need a wizard - try this:
    Trhough your project properties add the JSR-181 Web Service library
    In your session bean type @Web (at the top of the class or above a method) and you'll be prompted to import javax.jws.WebMethod (using Alt-Enter) then you can select the appropriate tag (@WebService for all methods to be published, @WebMethod at the individual method level, etc.)
    Then deploy your EJB as normal and voila! See the deployed EJB and Web Service
    Rgds
    Susan

  • External hard drive for both windows and mac

    hello, all - just bought a western digital 500gb my book premium edition external hard drive. will be using for both pc and macbook, not necessarily to share files (though i may on occasion), but rather as a backup. been researching the discussion boards and concluded that i should use it as pre-formatted fat32. few questions...
    1) if i do use to share files, from what i understand i will be able to read windows files with my mac but i can't read mac files with windows (unless i have macdrive installed). is this correct?
    2) since mac can read/write to fat 32, is it necessary to partition the drives and keep the files separated? i talked to a "computer guy" earlier today and he said i should consider having two completely separate external hard drives as having files from two different operating systems on the same drive could cause major problems for both... i didn't really believe him.
    3) i have seen different posts stating using fat32 format for mac limits file size to 4gb. another post said 32gb. which is right? i have os is 10.4.7 if that makes a difference.
    thanks in advance for any insight.

    2 - i don't mind partitioning at all. but he strongly suggested not even partitioning but using two completely separate hard drives. yeah, the 500gb was a bit overkill, so if i can use it for both as opposed to one and buying an additional, i'd rather.
    2/3 - if i partition, is it best to divide it into ntfs and hfs+? or should i keep the pc portion fat32? if the mac portion is hfs+, can i store any size file? i have videos that are anywhere from 10-20gb, and i'd like to get them off my computer and into the external drive.
    thanks.

Maybe you are looking for