Hi questions on ejb??????

hi everybody.... can you give my questions answers.........................
if we write abstract class in case of home and object interface? and all the methods needed put in the Abstract class is the ejb code is working..... if yes...so why.... if no then why........

Chunbo Huang <[email protected]> wrote:
Hi,
I have the following two questions on EJB while I am working a project based
on EJB:
(1) What is the guideline to implement a cluster-wise exclusive on EJB? In
another word, I want to have only one EJB instance for a DB record to be
created among all the cluster nodes. As far as I know, the EXCLUSIVE
concurrent control setting in EJB deployment descriptor only works in the
single node. Is that right?Yes.
(2) Giving the RObean cachel invalidation process, if I use cacheHome
interface to invaliate the corresponding RO beans, does this gurantee the
ROBean will not read any out-of-date data? Or there are still a small window
the ROBean may have the old data?Yes, there is a small window when RO bean can have the old data. If you invalidate
beans manually (using CachingHome) make sure you do this after update transaction
commits - that way RO bean will not read old data.
Thanks!
--chunbo--
Dimitri

Similar Messages

  • Some questions on EJBs

    hi, i am an intermediate javaee developer but i have some questions on EJBs. sometimes i wonder why do i want to use EJBs in an application. if possible please use some illustrations.
    1) What problems do EJBs both session bean and message driven bean solve respectively. like what was the motivation behind creating ejbs.
    for ex, someone complained to me once that an app his company wrote took time to load large sets of data, and he asked if he should use EJBs, and i am like, does an EJB load data faster? though i think i said it could help, not because i was sure, but because u know the "Biig EJB", it has to solve it.
    2) why do people compare spring and ejbs, and sometimes prefer spring over ejbs.
    3) in what situations could an EJB be neccessary/advantageous, and what are the disadvantages if any.
    thanks.

    java_everywhere wrote:
    1) What problems do EJBs both session bean and message driven bean solve respectively. like what was the motivation behind creating ejbs.
    for ex, someone complained to me once that an app his company wrote took time to load large sets of data, and he asked if he should use EJBs, and i am like, does an EJB load data faster? though i think i said it could help, not because i was sure, but because u know the "Biig EJB", it has to solve it.It doesn't solve any problems, it is a framework that you can use to make your development (and maintenance) cycle easier IF you use it properly. For example, you get integrated JMS support through message driven beans, no extra work needed there. You get container managed transactions, which made my life a whole lot easier once I got over that phase of thinking the server is responsible for everything (it is not, you are still in the driver seat when it comes to transaction management). As part of that transaction management you get out of the box ORM support through the JPA specification. You can take advantage of the load balancing features of the server for heavy weight applications. etc. etc.
    In essence you shouldn't think in terms of what EJB technology gives you; what does the entire JEE platform give you, of which EJB technology is only a component?
    >
    2) why do people compare spring and ejbs, and sometimes prefer spring over ejbs.A real world example: when putting together Ikea furniture you can usually get very far with only using those little tools they give you in the package. However, sometimes you are forced to use a screwdriver, a hammer or a drill. And sometimes you use a screwdriver to keep something in place while using the little Ikea tool to put in a screw. Combining the screwdriver and the Ikea tool usually stems from experience where using only one of them took so much longer and was so much more frustrating to get the things done.
    Interesting how real world examples usually translate to software development as well. Why would you limit yourself to using only one tool when combining tools could give you more flexibility and could solve a problem easier because you use the strengths of both to compliment each other?
    3) in what situations could an EJB be neccessary/advantageous, and what are the disadvantages if any.All technology exists because there was some need for it. Need rises from requirements, so this question is not answered right here and now - it should be asked on a per project basis. I have this project with these requirements, how could EJB technology help here? How could Spring help? How could Struts 2.0 help? etc. etc.

  • Question on EJB, JNDI and client jars

    Hi,
    This is a very fundamental question on EJBs and their clients - what
    all should go into the client jar of an ejb?
    I know for sure that just the remote and home interface classes of the
    ejb are sufficient on the client's classpath to work with an EJB on a
    totally different server, but I dont understand the logic behind it.
    If the client has to pass its object parameters over the network to
    the server where the ejb bean is located, should the container
    generated stub not be present on the client's classpath? After the
    client does the JNDI lookup of the ejb home on the server, how does it
    serialize and pass the parameters over the network if the container
    generated stub is not present?
    Any help would be greatly appreciated. Pointers to material on the
    internet which explain this/related things in detail would be a great
    help.
    Thank you,
    Anoushka

    "Anoushka" <[email protected]> writes:
    I know for sure that just the remote and home interface classes of the
    ejb are sufficient on the client's classpath to work with an EJB on a
    totally different server, but I dont understand the logic behind it.
    If the client has to pass its object parameters over the network to
    the server where the ejb bean is located, should the container
    generated stub not be present on the client's classpath? After the
    client does the JNDI lookup of the ejb home on the server, how does it
    serialize and pass the parameters over the network if the container
    generated stub is not present?Most protocols (IIOP, T3, JRMP) provide a slot for encoding a codebase
    in RMI requests. The codebase is usually an http URL that specifies
    where to get classes that are not currently available to the
    client. This URL is used to construct a java.net.URLClassLoader which
    then downloads classes on demand. These classes can include stubs,
    object arguments - pretty much anything you like. There are certain
    security restrictions on the URLClassLoader which is why you sometimes
    have to specifiy a security manager in a client. T3 will for
    preference generate stubs in the client rather than download them,
    however this is not allowed in an applet - and so in this case T3 will
    also download stubs from the server.
    The net of this is that you don't have to put very much at all in a
    client jar UNLESS you can't use the URLClassLoader. In that instance
    you have to put EVERYTHING you need in the client jar.
    HTH
    andy

  • Fundamental question on EJB, JNDI and client jars

    Hi,
    This is a very fundamental question on EJBs and their clients - what
    all should go into the client jar of an ejb?
    I know for sure that just the remote and home interface classes of the
    ejb are sufficient on the client's classpath to work with an EJB on a
    totally different server, but I dont understand the logic behind it.
    If the client has to pass its object parameters over the network to
    the server where the ejb bean is located, should the container
    generated stub not be present on the client's classpath? After the
    client does the JNDI lookup of the ejb home on the server, how does it
    serialize and pass the parameters over the network if the container
    generated stub is not present?
    Any help would be greatly appreciated. Pointers to material on the
    internet which explain this/related things in detail would be a great
    help.
    Thank you,
    Anoushka

    hello,
    well, the process is fairly simple actually.. The client needn't necessarily have
    the container generated stub. as a client u could contact what is known as a boot-strap
    service to download the stub over the wire.. infact one of the advantages of RMI
    is precisely that. and since RMI is the underlying architecture of EJBs, it all
    becomes rather simple. when u 'lookup' a bean, what u are in essence doing is
    asking the server to send down the stub to your JVM. well.. right now this is
    what i got time for..i will try to post a lengthier explanation in a couple of
    days at leisure..
    Vijay
    "Anoushka" <[email protected]> wrote:
    >
    Hi,
    This is a very fundamental question on EJBs and their clients - what
    all should go into the client jar of an ejb?
    I know for sure that just the remote and home interface classes of the
    ejb are sufficient on the client's classpath to work with an EJB on a
    totally different server, but I dont understand the logic behind it.
    If the client has to pass its object parameters over the network to
    the server where the ejb bean is located, should the container
    generated stub not be present on the client's classpath? After the
    client does the JNDI lookup of the ejb home on the server, how does it
    serialize and pass the parameters over the network if the container
    generated stub is not present?
    Any help would be greatly appreciated. Pointers to material on the
    internet which explain this/related things in detail would be a great
    help.
    Thank you,
    Anoushka

  • Question about EJB and thread safe coding - asking again!

    sorry everyone, no one seems to be interested in helping me on this, so i post it again.
    i have a question about the EJB and thread safe coding. when we build EJBs, do we need to worry about thread safe issue? i know that EJBs are single threaded, and the container manages the thread for us. maybe i am wrong about this. if i wasnot, how can we program the EJB so that two or more instance of EJB are not going to have deadlock problem when accessing data resources. do we need to put syncronization in ours beans, do we even need to worry about creating a thread safe EJB? thanks in advance. the question really bothers me a lot lately.

    sorry everyone, no one seems to be interested in
    helping me on this, so i post it again.Excellent plan. Why not search a little bit on your own instead of waiting for your personal forum slaves to answer your call. See below.
    i have a question about the EJB and thread safe
    coding. when we build EJBs, do we need to worry about
    thread safe issue? Read this: http://forum.java.sun.com/thread.jsp?forum=13&thread=562598&tstart=75&trange=15
    i know that EJBs are single
    threaded, and the container manages the thread for us.
    maybe i am wrong about this. if i wasnot, how can we
    program the EJB so that two or more instance of EJB
    are not going to have deadlock problem when accessing
    data resources. do we need to put syncronization in
    ours beans, do we even need to worry about creating a
    thread safe EJB? thanks in advance. the question
    really bothers me a lot lately.
    Java's Thread Tutorial
    JavaWorld: Introduction to Java threads
    IBM: Introduction to Java threads
    Google: java+threads+tutorial

  • Questions about EJB

    I'm new to EJB.
    I want to know what is ant and JBoss ?
    Is ant is used to deploy ?
    And what is the advantages of deploy ?
    Also, is this possible to run EJB in Tomcat 4.0 ?
    sorry for too many question.
    Thank you !

    Ant is build/compile tool (plus some). Ant can perform all kinds of tasks (javac commands, ftp, jar, etc) and is java-based (meaning you can even write your own classes to perform a task and "plug" it into Ant). Ant is capable of doing an EJB deploy.
    Deployment is simply (simple in concept, not always in doing that is) the process of making the EJB or other services you create available to an app server like Weblogic or JBoss.
    Tomcat is only a Servlet Container and can only be used to deploy Servlets and JSPs. To run/host EJBs, you will need to get a J2EE application server. Many free ones exist (like Resin or JBoss) as well as many commercial ones (such as Bea's Weblogic, IBM's WebSphere, and Borland's AppServer).
    Hope this helps.

  • Question on EJB 2.1 using Netbeans 5.5 Beta 2. Cant understand error msg

    "IOP00100006: (BAD_PARAM) Class com.sun.ejb.containers.EJBLocalObjectInvocationHandler is not Serializable"
    org.omg.CORBA.BAD_PARAM:   vmcid: OMG  minor code: 6 completed: Maybe
            at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:996)
            at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:1011)
            at com.sun.corba.ee.impl.orbutil.ORBUtility.throwNotSerializableForCorba(ORBUtility.java:730)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:636)
            at com.sun.corba.ee.impl.encoding.CDROutputStream.write_abstract_interface(CDROutputStream.java:260)
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:489)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:721)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:787)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:201)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:570)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:156)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:224)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:206)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:146)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:787)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:836)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:850)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:631)
            at com.sun.corba.ee.impl.encoding.CDROutputStream.write_abstract_interface(CDROutputStream.java:260)
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:489)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectOverride(IIOPOutputStream.java:135)
            at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
            at java.util.ArrayList.writeObject(ArrayList.java:569)
            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:585)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:602)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:568)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:156)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:224)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:206)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:146)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:787)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:836)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:850)
            at com.sun.corba.ee.impl.encoding.CDROutputStream.write_value(CDROutputStream.java:243)
            at com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:43)
            at com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:32)
            at com.sun.corba.ee.impl.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:39)
            at com.sun.corba.ee.impl.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:30)
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.copyObject(Util.java:745)
            at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.copyResult(DynamicMethodMarshallerImpl.java:414)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:202)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:119)
            at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:197)
            at ejb._CustomerFacadeRemote_DynamicStub.getAllCustomers(_CustomerFacadeRemote_DynamicStub.java)
            at web.customerList.processRequest(customerList.java:39)
            at web.customerList.doGet(customerList.java:72)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
            at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    |#]
    java.rmi.MarshalException: CORBA BAD_PARAM 1330446342 Maybe; nested exception is:
            java.io.NotSerializableException:
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:257)
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.wrapException(Util.java:678)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:218)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:119)
            at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:197)
            at ejb._CustomerFacadeRemote_DynamicStub.getAllCustomers(_CustomerFacadeRemote_DynamicStub.java)
            at web.customerList.processRequest(customerList.java:39)
            at web.customerList.doGet(customerList.java:72)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
            at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Caused by: java.io.NotSerializableException:
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:250)
            ... 33 more
    Caused by: org.omg.CORBA.BAD_PARAM:   vmcid: OMG  minor code: 6 completed: Maybe
            at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:996)
            at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:1011)
            at com.sun.corba.ee.impl.orbutil.ORBUtility.throwNotSerializableForCorba(ORBUtility.java:730)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:636)
            at com.sun.corba.ee.impl.encoding.CDROutputStream.write_abstract_interface(CDROutputStream.java:260)
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:489)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:721)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:787)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:201)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:570)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:156)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:224)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:206)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:146)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:787)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:836)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:850)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:631)
            at com.sun.corba.ee.impl.encoding.CDROutputStream.write_abstract_interface(CDROutputStream.java:260)
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:489)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectOverride(IIOPOutputStream.java:135)
            at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
            at java.util.ArrayList.writeObject(ArrayList.java:569)
            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:585)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:602)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:568)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:156)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:224)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:206)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:146)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:787)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:836)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:850)
            at com.sun.corba.ee.impl.encoding.CDROutputStream.write_value(CDROutputStream.java:243)
            at com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:43)
            at com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:32)
            at com.sun.corba.ee.impl.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:39)
            at com.sun.corba.ee.impl.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:30)
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.copyObject(Util.java:745)
            at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.copyResult(DynamicMethodMarshallerImpl.java:414)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:202)
            ... 31 moreTo start off, that is my error. I am following this http://www.netbeans.org/kb/50/quickstart-j2ee.html article and so far I can get the entire code working. Netbeans truly makes it easy!
    Now I decided to expand on the example and so I used a caching service locator and added one more finder method to the Customer entity bean (CMP). It is a findAllCustomers method that returns a collection and the EJB QL I entered was as follows:
    SELECT OBJECT(o) FROM Customer oI correspondingly added another business method to the session facade bean and I wrote a servlet that calls upon the caching service locator class and gets a reference to the session facade bean and calls the findAllCustomer method and gets back a List of all Customers. Then it takes the List, sticks it into the HttpServletRequest object and calls sendredirect to a JSP that is the view.
    The JSP is straightforward in that I have a foreach jstl tag that is going to display the customers in a table format. So when I run the code the way it is, what happens when I access that servlet is that the it gets rerouted to the jsp page, but the table does not get displayed...but the above error gets posted in the Netbeans SJSAS console. I have never encountered that kind of error before so i am a bit stumped and don't know how to go about decoding that stacktrace.
    Any pointers or suggestions or solutions (much prefer this one) would be great!
    Thanks a lot. Sorry for the rather long post. If needed I can package up the entire project and send it to you.
    Cheers,
    Surya

    It sounds like you're attempting to pass Local EJB objects over a Remote interface, which is not permitted. EJBLocalObjects can not be passed outside the ejb tier. You'll need to either pull their data out into data access object classes (basically structs) or return EJBObjects.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Basic question concernign EJB class

    Hi,
    I can not understand why a EJB bean class implements methods defined in the remote interface but not 'implements' that interface itself.
    who 'implements' that remote interface.
    thanks a lot for your time.
    Benjamin

    Hi !
    The remote inteface inturn has the signatures of all the methods present in the Bean class and not the vice versa and hence u see all the complete bussiness methods in the Bean interface.
    Hope i am clear
    Regards,
    Vin

  • Questions about EJB local interfaces - 9iAS 9.03

    Intro: I am new in developing EJB, and I am trying to build an example to verify that a stateless session bean with local interfaces is quite efficient.
    Q1: I have read that an application trying to access local interfaces of an EJB must run into the same JVM. Does it means that it should be deployed into the same OC4J instance as the servlet?
    Q2: I am using JDev 10g to build the EJB, with local and remote interfaces. Using the internal OC4J container, I can use the remote interfaces but not the internal one: an object of class "_Proxy1" is returned after the lookup (with the same name as given for the remote interface related call). Is it possible to access the local interface?
    Q3: My application architecture is already defined to split the business logic in two EJBs: one stateless session bean for volatile data and one entity bean for a global user list cache. Where can I find a working example (with source code, please) to be deployed on 9iAS that can validate my design?
    Q4: In many places, I read that CMP entity bean are easier to develop than BMP one. Is there any special consideration I should be aware of before implementing a CMP for my global user list cache?
    Thanks a lot, Dom.

    I have just read:
    I think the problem is that local interfaces can only by
    accessed through the same container, and JSP/Servlet's
    one is different from EJB's one, regardless of you many
    application server's instances do you have... Hope this
    is the answer...Is there anyone who know if it applies too to 9iAS?
    A+, Dom

  • Specification/Architectural question about EJBs and XML

    Hello,
    My problem is as follows: I would like for a session ejb to retrieve information from xml files (other that the ejb DDs of course...). I prefer the XML-file solution to the relational-database solution as it is more lightweight. (We haven't got the resources nor the skill to administrate a native xml database.) Am I allowed to read from the filesystem? What is the best architectural solution you would advise bearing in mind I need the information contained in the xml files to be available in java (in the session bean). Ideally I would drop xml files in a directory and they would automatically be parsed and taken into account by an ejb.
    I am available to provide more details if needed.
    Any clue welcome,
    Julien Martin.

    Hello,
    My problem is as follows: I would like for a session ejb to retrieve information from xml files (other that the ejb DDs of course...). I prefer the XML-file solution to the relational-database solution as it is more lightweight. (We haven't got the resources nor the skill to administrate a native xml database.) Am I allowed to read from the filesystem? What is the best architectural solution you would advise bearing in mind I need the information contained in the xml files to be available in java (in the session bean). Ideally I would drop xml files in a directory and they would automatically be parsed and taken into account by an ejb.
    I am available to provide more details if needed.
    Any clue welcome,
    Julien Martin.

  • Small question on ejb's call back methods?

    Hi I just don't want to use the declarative security where we configure roles, users and methods in deployment descriptors. I have written authorization code in a method and this method should be called before any business method is called to check authorization. Is this possible? if so how?
    Edited by: murrayb9654 on Aug 27, 2010 12:00 PM

    you'll want to look into interceptors. You can configure an interceptor to invoke on EVERY EJB call.
    Check out this blog for example:
    [http://www.adam-bien.com/roller/abien/entry/interceptors_ejb_3_for_absolute|http://www.adam-bien.com/roller/abien/entry/interceptors_ejb_3_for_absolute]
    For the ejb-name, you can put * to indicate it should be invoked for all EJB calls, or you can put a more specific pattern.

  • Baisc question on EJB

    Hi All,
    Just want to know what is the difference between the local interface and a remote interface in context to an EJB, and when should each of them may be used.
    Thanks and regards
    Rajat Aggarwal

    Hi ,
    Remote Clients
    A remote client of an enterprise bean has the following traits:
    1.It can run on a different machine and a different Java virtual machine (JVM) than the enterprise bean it accesses. (It is not required to run on a different JVM.)
    2.It can be a web component, an application client, or another enterprise bean.
    3.To a remote client, the location of the enterprise bean is transparent.
    To create an enterprise bean that allows remote access, you must do one of the following:
    1. Decorate the business interface of the enterprise bean with the @Remote annotation:
    @Remote
    public interface InterfaceName { ... }
    2. Decorate the bean class with @Remote, specifying the business interface or interfaces:
    @Remote(InterfaceName.class)
    public class BeanName implements InterfaceName { ... }
    Local Clients
    A local client has these characteristics:
    1.It must run in the same JVM as the enterprise bean it accesses.
    2.It can be a web component or another enterprise bean.
    3. To the local client, the location of the enterprise bean it accesses is not transparent.
    The local business interface defines the bean�s business and life cycle methods. If the bean�s business interface is not decorated with @Local or @Remote, and the bean class does not specify the interface using @Local or @Remote, the business interface is by default a local interface. To build an enterprise bean that allows only local access, you may, but are not required to do one of the following:
    1. Annotate the business interface of the enterprise bean as a @Local interface. For example:
    @Local
    public interface InterfaceName { ... }
    2. Specify the interface by decorating the bean class with @Local and specify the interface name. For example:
    @Local(InterfaceName.class)
    public class BeanName implements InterfaceName { ... }
    All above was taken from JavaEE 5 Tutorial.
    Good Luck.

  • A question about EJB timeouts

    Good day!
    I encountered an interesting situation about EJB timer service.
    1) For example, I created an implementing TimerObject Stateless Session Bean.
    2) In ejbSetSessionContext method I created an timer to invoke ejbTimeout on my EJB every 15 seconds.
    3) Ok. Container invokes this ejbTimeout every 15 sec. But what happens is previous ejbTimeout didn't returned because it is waiting for some connection for example. Would container invoke ejbTimeout while processing previous ejbTimeout on this one Stateless EJB?
    I looked in EJB 2.1 spec. but didn't find corresponding answer.

    Hi russiandroopy,
    This isn't specifically mentioned in the spec because the design center of the Timer Service was not fine-grained events. The spec suggests that typical timeouts would be on the order of minutes or hours, which is typically much longer than the duration of the handling time within a timeout method or business method. In SUN's implementation we do not attempt to deliver a subsequent periodic timeout until the previous timeout completes successfully.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Pls help - Syntax question about EJB QL

    Hello,
    I'm new learner on EJB. I went through the specification 2.0 of EJB QL released by Sun, I'm not quite understand the syntax definition of SELECT clause in finder method which described in the following words:
    "In the case of a find method, the SELECT clause is restricted to contain either a single range variable or a single value path expression that evaluates to the abstract schema type of the entity bean for which the finder method is defined.
    Because finder method cannot return arbitrary types, the SELECT clause of an EJB QL defined for a finder method must always correspond to the abstract shcema type fo the entity bean for which the finder method is defined.In contrast, the SELECT clause of a query defined for a select method can return the abstract schema types of other entity beans or the values of cmp-fields."
    As my understanding, I think the SELECT clause of finder method can only contain a single range variable instead of single value path expresson, it should have only one format, which is "SELECT [DISTINCT] OBJECT(identification_variable)".
    For example: the query below is defined in OrderBean findByProductType();
    SELECT OBJECT(o) FROM Order o, IN(o.lineItems) l
    WHERE l.product.product_type = 'schoolsupplies'
    how it could be a single value path expression , I think this format can only be used in Select method.
    The other thing is EJB QL2.0 does not support subquery and "NOT EXIST" clause, does this mean that a SQL query with subquery or "NOT EXIST" clause can't be translated to EJB QL?
    I don't know if I'm correct or not. I'd appreciate if anybody can help me with this.
    Thanks!
    Maggie

    Hi,
    Weblogic
    =======
    In the Weblogic-cmp-rdbms-jar.xml file, we define the Table name as created in the DBMS along with cmp-field mapped to the dbms-columns of the table as described below
    <table-map>
    <table-name>SalesAccounts</table-name>
    <field-map>
    <cmp-field>salesaccountId</cmp-field>
    <dbms-column>sales_acctid</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>salesbalance</cmp-field>
    <dbms-column>sales_bal</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>salesaccountType</cmp-field>
    <dbms-column>sales_type</dbms-column>
    </field-map>
    </table-map>
    Here SalesAccounts is the actual table defined in DBMSD like Oracle say which has columns sales_acctid, sales_bal and sales_type.
    In ejb-jar.xml, you define an abstract schema name ie some sort of alias for your table name (SalesAccounts) along with defining the cmp fields required for writing a EJB-QL.
    <abstract-schema-name>SalesAccountBean</abstract-schema-name>
    <cmp-field><field-name>salesaccountId</field-name>
    </cmp-field>
    <cmp-field><field-name>salesbalance</field-name>
    </cmp-field>
    <cmp-field><field-name>salesaccountType</field-name>
    </cmp-field>
    <primkey-field>salesaccountId</primkey-field>
    Here salesaccountid is defined as a Primary key.
    Now your EJB-QL can be defined in the ejb-jar.xml file as follows
    <query>
    <query-method>
    <method-name>findSalesAccountsCondition</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
         <![CDATA[SELECT OBJECT(a) FROM SalesAccountBean AS a WHERE a.salesbalance > ?1]]>
    </ejb-ql>
    </query>
    This should clear ur doubts. Case u have any, revert back to me.
    Rgds,
    Seetesh

  • Question deploying ejbs, possible bug

    I am deploying my ejbs with an ear file and I specified for only 3 beans to be created
    at start up but I saw it created the Bean more than 3 times when the server is started.
    Is this normal?
    I'm also having problems with the auto redeploy. It never redeploy in the correct
    order forcing me to restart the server. Any help would be greatly appreciated.

    Hi.
    Server version? Are you using the latest service pack?
    Regards,
    Michael
    Kye wrote:
    I am deploying my ejbs with an ear file and I specified for only 3 beans to be created
    at start up but I saw it created the Bean more than 3 times when the server is started.
    Is this normal?
    I'm also having problems with the auto redeploy. It never redeploy in the correct
    order forcing me to restart the server. Any help would be greatly appreciated.--
    Michael Young
    Developer Relations Engineer
    BEA Support

Maybe you are looking for

  • Flash Builder 4.7 downgrade to 4.6 version

    Hey, We have bought a license key for upgrade from Flash Builder 4.0 SE to Flash Builder 4.7 SE, but we need access to Designer View which is not available in FB 4.7. Our distributor tell us, that it is possible by doing downgrade to Flash Builder 4.

  • FRUSTRATED:Simple Tasks - Am I missing something or does iTunes fall short?

    So last night I became VERY frustrated because I attempted the SIMPLE TASK OF COPYING MP3 files to a flash card and ran into SEVERAL snags... I wanted to copy just my MP3 files (not AAC) and ran into the following snags: 1) I COULD NOT FIND ANY WAY t

  • Club newsletter in MS Word arrives blank

    I had been receiving our local Rotary Club newsletter, which the editor composes in a Windows version of MS Word, just fine until recently. Now when I download the document (which appears on the desktop as the standard Word icon), it opens to a blank

  • DATE AND TIME PICKER ACTIVEX NOT WORKING

    The microsoft date and time picker (6.0) is not working in systems which doesnt have MS office. What is the solution to use this in systmes which doesnt have office.

  • XCelsius + Live Office Error 26315

    Hi Friends, I created an Xcelsius Dashboard based on the universe using live office. In Universe I specified row level security to a particular user group. If I login as a user under that particular group in the infoview and try to open the dashboard