EJB timeout - removal

I have a SessioBean, this bean is removed when client is logged out , if client is not logging out / client crash the bean should be removed from server after a specified period of time. We tried setting timeout attribute to tag <session-deployment> in the orion-ejb-jar.xml file. but this doesnt work. see bug #173 in orion bugzilla( http://bugzilla.orionserver.com/bugzilla/show_bug.cgi?id=173 ),
So we need a scheme to detect client disconnection/Inactivity and to remove unused beans from the application server ,

On WebSphere you can specify 'Transaction timeout' and 'Transaction inactivity timeout' fields for each application server from its Administrative Console. I'm not farmiliar with other vendor's product but I'll assume they should have similar function to compete. So depends on what you want to do you may have a few options:
1. Make the client's timeout a little more than the transaction timeout value so you can make sure if something gets returned the client will receive it.
2. If you don't have control on either of the server's transaction timeout or client's timeout, assign a default boolean to the client method when it timeouts.
3. I don't think you need to handle the 'orphan response'. Say, let's suppose the client method never timeouts and so it receives the response all the time, will the EJB know the response gets received or not? Probably not, because this is not a message service. It simply does not care. That is why I don't feel you need handle this.
PC

Similar Messages

  • EJB CMP remove create cache issue? DuplicateKeyException

    EJB CMP remove create cache issue? DuplicateKeyException
    Hi I have an EJB 2.1 application using CMP. Most things work fine. But if I in a transaction tries to remove a bean and create a new one with the same primary key I get a DuplicateKeyException:
    2007-11-16 09:25:31,963 ERROR [RMICallHandler-6] AdminGroupData_ConcreteSubClass147 - Error adding AccessRules:
    javax.ejb.DuplicateKeyException: Exception [EJB - 10007]: Exception creating bean of type [AccessRulesData]. Bean already exists.
    at oracle.toplink.internal.ejb.cmp.EJBExceptionFactory.duplicateKeyException(EJBExceptionFactory.java:195)
    I suspect that the remove call only removes from the cache (until commit), but that the create call checks the database or something?
    My code is simple like the following:
    AdminPreferencesDataLocal apdata1 = adminpreferenceshome.findByPrimaryKey(certificatefingerprint);
    adminpreferenceshome.remove(certificatefingerprint);
    adminpreferenceshome.create(certificatefingerprint,newadminpreference);
    Is there some configuration I can set in toplink-ejb-jar.xml to fix this?
    I use OC4j 10.1.3.3
    Cheers,
    Tomas

    The bean.remove() was executed but the sql DELETE was executed to the database as the result, oc4j manages all sql statements and they are optimized to commit to the database in batch at once when the transaction commit. Oc4j ejb container is smart and preventing you from creating the same entity cached in the transaction because the sql delete was not really committed to the database when the create is called.
    My guess is that the reason it works with IBM WAS was because it issued sql for each remove/create call right away instead of doing them in batch as oc4j, or your WAS remove then create were called in separate transactions.

  • EJB timeout.

    Hi! Everyone,
         I am having a problem that I am not sure how to solve this. Hopefully I can get
    some help from expert out there. The situation I am running into is that my application
    that runs inside the Weblogic server need to make a method call to a EJB which runs
    on iPlanet on a different Unix box. My Weblogic Server will stop running (freeze)
    when the iPlanet app server had a core dump. I did a thread dumping on the weblogic
    side. All “ExecuteThread” are had same message as I show below.
    "ExecuteThread: '12' for queue: 'default'" daemon prio=5 tid=0x76e790 nid=0x173 waiting
    on monitor [0xd65f000..0xd65fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:420)
         at com.sun.corba.se.internal.orbutil.Condition.wait(Condition.java:28)
         at com.sun.corba.se.internal.iiop.IIOPConnection.send(IIOPConnection.java:1002)
         at com.sun.corba.se.internal.iiop.IIOPOutputStream.invoke(IIOPOutputStream.java:76)
         at com.sun.corba.se.internal.iiop.ClientRequestImpl.invoke(ClientRequestImpl.java:87)
         at com.sun.corba.se.internal.corba.ClientDelegate.invoke(ClientDelegate.java:158)
         at com.sun.corba.se.internal.corba.ClientDelegate.invoke(ClientDelegate.java:198)
         at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:459)
    at……
    Any idea on how to broken the pipe between Weblogic and iPlanet when iplanet had
    core dump?
    Thanks a Lot!

    A runtime exception could be getting thrown as well. Add a
    try {
    } catch ( Throwable t ) {
    System.err.println(t);
    around your loop.
    Or, better yet, attach a debugger to the process if you can.
    Slava Imeshev wrote:
    Hi Jani,
    Loop can not break itself. Java is not that smart yet.
    I'd check the code for things like:
    } catch (Exception ex) {
    Slava
    "Jani P." <[email protected]> wrote in message
    news:[email protected]..
    Hello,
    I have a problem related to session Bean which has a method making
    simple queries to database. The problem shows when i call the method
    from client in a loop....exactly when the loop has run 50sec (the method
    has been called like 100-140 times). After 50sec the loop just breaks
    off without any Exception or Error messages.
    I have tried to find from config.xml something in settings that
    indicates to 50sec timeout, but haven't found anything.
    Does someone have a hint for me?
    Our Weblogic6.1 SP3 is running on Linux and the database we are using is
    Oracle8.i.
    Jani
    Steve Buzzard
    Anexinet
    One International Plaza
    Suite 140
    Philadelphia, PA 19113
    http://www.anexinet.com

  • How to set the EJB timeout value??

    I made a Swing application connecting with EJB to provide some service. If I set the correct J2EE server IP, everything works fine. However, it will throw an Exception after some time, if I set an incorrect IP. I would like to ask if there is any means to set a timeout value for the Swing application that it throws an exception while it cannot connect to the server after the timeout value.

    Hi,
    Amount of time required to call an EJB on a remote server depends on, I would guess, multiple factors, like server performance, network speed, link quality, etc. I'm not sure if there is a direct way of telling the client-side code to wait for results for a limited amount of time, but in general blocking on the client side until the server results are available is not a good idea (at least not from the GUI perspective, since you would be locking the display). Either way, you could make all your EJB calls from a separate thread, and timeout that. This way your client code would have complete control of responsiveness of the server side.
    Just a thought.
    Mark

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • EJB / Timeout / HttpUrlConnection

    I have an EJB that needs to talk to an outside vendor using http.
    Is there a way I can specify a timeout and thus if the vendor http port is down,
    the bean doesn't try forever to connect.
    I saw a similar post in this newsgroup and a proposed solution but that works
    only for https.
    I was hoping to find either 1) a property somewhere in weblogic to control the
    timeout parameter. This call is in a bean method by itself.
    2) A timeout parameter that could be specified while connecting to the external
    port.
    We are using WLS 6.1/JDK 1.3.1.
    Here is a code snippet...
    URL myURL = new URL (....)
    HttpURLConnection myConn = myURL.getOpenConnection();
    myURL.getOutputStream()

    1.4 finally supports this. Using 1.3 you have several choices to add
    read timeout:
    use HTTPClient: http://www.innovation.ch/java/HTTPClient/
    if you use Sun's JVM this hack works: http://www.logicamente.com/sockets.html
    2) Until 1.4 there is no way to specify socket connect timeout.
    Ashish <[email protected]> wrote:
    I have an EJB that needs to talk to an outside vendor using http.
    Is there a way I can specify a timeout and thus if the vendor http port is down,
    the bean doesn't try forever to connect.
    I saw a similar post in this newsgroup and a proposed solution but that works
    only for https.
    I was hoping to find either 1) a property somewhere in weblogic to control the
    timeout parameter. This call is in a bean method by itself.
    2) A timeout parameter that could be specified while connecting to the external
    port.
    We are using WLS 6.1/JDK 1.3.1.
    Here is a code snippet...
    URL myURL = new URL (....)
    HttpURLConnection myConn = myURL.getOpenConnection();
    myURL.getOutputStream()--
    Dimitri

  • EJB QL - removal from 2 tables in one query

    Hi All,
    I have a question - can I delete data from 2 tables in the one EJB 3 query ?
    For example:
    delete from AaaaaSaaaaRaaaaa a, AaaaaFaaaaaRaaaaa b where a.id = b.id and a.startTime < :STARTTIMEAaaaaSaaaaRaaaaa and AaaaaFaaaaaRaaaaa - two separated entities mapped on the different tables.
    In this case I got exception:
    ERROR [PARSER] line 1:76: unexpected token: ,Thanks !

    I think .. answer is - NO :(
    Another question - how to delete data from 2 tables in the one query in some other way (with condition above and with EJB QL)?
    Thanks

  • Removing an IIOP User connection to an EJB on JServer

    I am writing an application using a servlet engine to connect to an EJB in JServer. I am not using connection pooling because each user will be logging in with their database username. When the session times out on the servlet, I would like to clean up the connection, and release the EBJ/IIOP connection. Is there a preferred method to do this, or should I let JServer time out?
    Thanks
    Ken

    The beans have session lifetime and will be removed/cleaned up when the session is deleted.
    The session is constructed when the first JNDI lookup (on InitialContext) to an object (EJB in your case) of a given database instance is made. The session is deleted when there are :
    a) no connections to the session
    -and-
    b) the EJB timeout has expired.
    The timeout only starts ticking when there are no connections to the session.

  • How is remote stateless session EJB removed, if clients don't remove() it

    I've seen code that doesn't call .remove, and Sun's tutorial also doesn't .remove(), despite the fact that the create() call is made:
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/EJB4.html#wp79902
    My questions are:
    1. .create() instantiates a new remote instance, doesn't it?
    2. since clients don't call .remove(), how does the remote instance get ejbRemove()d?
    2.1. Does perhaps the home instance of such ejb cause removal upon finalize()? I've seen some auto-generated EJB stubs, but i don't see that being the case.

    Clients do have the option of calling remove() but the behavior depends on the kind of
    session bean.
    For stateless session beans, calling remove() doesn't have much value since the lifetime
    of the bean instances in the container is decoupled from the client. An ejb container
    is free to use the remove call as a hint, but in general the container will clean up instances
    when it deems it necessary. Most implementations define a number of configuration
    parameters to control this, e.g., max-pool-size.
    For stateful session beans, calling remove() will indeed remove that session bean identity,
    whether it's in memory or it has been passivated. Even in the absence of an explicit
    client call to remove(), the container is still free to remove a stateful session bean.
    Most implementations define a set of timeout parameters that control this behavior.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Javax.ejb.NoSuchObjectLocalException when removing entitybean

    Weblogic 10.3.0.0
    EJB 2.1
    Hi. I am using the below code to remove a record in the database. But it happens that I get a javax.ejb.NoSuchObjectLocalException.
    Before this code is executed, I load the data from the database and create a list of sealsInfoTO that has to be removed, so I only get sealsInfoTO that exists in the database.
    It all is in the same transaction that is started in a session bean.
    It is not only happening with the seals, but also other objects that goes through likewise code
    Iterator removedIterator = seals.removedIterator();
            while (removedIterator.hasNext()) {
                sealsInfoTO = (SealsInfoTO) removedIterator.next();
                if ((sealsId = sealsInfoTO.getSealsId()) != null) {
                    sealsInfoLocal = BeanFactory.getInstance().getSealsInfoLocal(sealsId);
                    try {
                        sealsInfoLocal.remove();
                        log.debug("sealsInfoLocal with pk " + sealsId + " has been removed by the client");
                    } catch (RemoveException e) {
                        log.error("Can not remove SealsInfo", e);
                        throw new SystemException("Can not remove SealsInfo", e);
    javax.ejb.NoSuchObjectLocalException: [EJB:010142]Instance of EJB 'SealsInfo' with primary key '183109' does not exist.: javax.ejb.NoSuchEntityException: [EJB:010142]Instance of EJB 'SealsInfo' with primary key '183109' does not exist.
         at dk.steria.exp.midtier.model.declaration.ejb.SealsInfo_tjm27k__WebLogic_CMP_RDBMS.ejbRemove(SealsInfo_tjm27k__WebLogic_CMP_RDBMS.java:2682)
         at weblogic.ejb.container.manager.DBManager.remove(DBManager.java:1661)
         at weblogic.ejb.container.internal.EntityEJBLocalObject.remove(EntityEJBLocalObject.java:129)
         at dk.steria.exp.midtier.model.declaration.ejb.SealsInfo_tjm27k_ELOImpl.remove(SealsInfo_tjm27k_ELOImpl.java:646)
         at dk.steria.exp.midtier.tools.consumer.Process.processSealsInfo(Process.java:382)
         at dk.steria.exp.midtier.tools.consumer.DeclarationConsumer.updateDeclaration(DeclarationConsumer.java:205)
         at dk.steria.exp.midtier.tools.consumer.DeclarationConsumer.updateDeclaration(DeclarationConsumer.java:157)
         at dk.steria.exp.midtier.tools.consumer.DeclarationConsumer.submitDeclaration(DeclarationConsumer.java:1207)
         at dk.steria.exp.midtier.api.declaration.ejb.DeclarationSBBean.submitDeclaration(DeclarationSBBean.java:871)Edited by: Kristian Lind on Sep 4, 2012 10:56 AM

    Yogavelan...for a faster response, post your question in the Oracle9i JDeveloper Forum:
    JDeveloper and ADF
    This forum is for member feedback about OTN services and content only; it is not monitored by product teams.

  • Sample weblogic-ejb-jar.xml for Resource-ref EJB 3.0

    I am trying to create an MDB that can be re-used under different names.
    @MessageDriven(description = "An MDB that transfers messages from one Queue to another", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") })
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
    public class TransferMdb implements MessageListener {
    private static final Logger LOG = Logger.getLogger(TransferMdb.class);
    @Resource(name = "jms/connfactory")
    private ConnectionFactory connectionFactory;
    @Resource(name = "jms/targetDestination")
    private Queue targetDestination;
    <ejb-jar version="3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_3_0.xsd">
    <enterprise-beans>
    <message-driven>
    <ejb-name>TransferMdb</ejb-name>
    <ejb-class>TransferMdb</ejb-class>
    </message-driven>
    </enterprise-beans>
    </ejb-jar>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>TransferMdb</ejb-name>
    <message-driven-descriptor>
    <pool>
    <max-beans-in-free-pool>200</max-beans-in-free-pool>
    <initial-beans-in-free-pool>5</initial-beans-in-free-pool>
    </pool>
    <destination-jndi-name>test_queue</destination-jndi-name>
    <transaction-descriptor>
    <trans-timeout-seconds>20</trans-timeout-seconds>
    </transaction-descriptor>
    </message-driven-descriptor>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jms/connectionfactory</res-ref-name>
    <jndi-name>connectionfactory</jndi-name>
    </resource-description>
    <resource-description>
    <res-ref-name>jms/targetDestination</res-ref-name>
    <jndi-name>reply_queue</jndi-name>
    </resource-description>
    </reference-descriptor>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    However when I deploy the above, I get exceptions such as:
    problem: cvc-complex-type.2.4a: Expected elements 'initial-context-factory@http://www.bea.com/ns/weblogic/weblogic-ejb-jar provider-url@http://www.bea.com/ns/weblogic/weblogic-ejb-jar connection-factory-jndi-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar jms-polling-interval-seconds@http://www.bea.com/ns/weblogic/weblogic-ejb-jar jms-client-id@http://www.bea.com/ns/weblogic/weblogic-ejb-jar generate-unique-jms-client-id@http://www.bea.com/ns/weblogic/weblogic-ejb-jar durable-subscription-deletion@http://www.bea.com/ns/weblogic/weblogic-ejb-jar max-messages-in-transaction@http://www.bea.com/ns/weblogic/weblogic-ejb-jar distributed-destination-connection@http://www.bea.com/ns/weblogic/weblogic-ejb-jar use81-style-polling@http://www.bea.com/ns/weblogic/weblogic-ejb-jar init-suspend-seconds@http://www.bea.com/ns/weblogic/weblogic-ejb-jar max-suspend-seconds@http://www.bea.com/ns/weblogic/weblogic-ejb-jar security-plugin@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' instead of 'transaction-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' here in element message-driven-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar:<null>
    problem: cvc-complex-type.2.4a: Expected elements 'transaction-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar iiop-security-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar resource-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar resource-env-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar ejb-reference-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar service-reference-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar enable-call-by-reference@http://www.bea.com/ns/weblogic/weblogic-ejb-jar network-access-point@http://www.bea.com/ns/weblogic/weblogic-ejb-jar clients-on-same-server@http://www.bea.com/ns/weblogic/weblogic-ejb-jar run-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar create-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar remove-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar passivate-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar jndi-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar local-jndi-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar dispatch-policy@http://www.bea.com/ns/weblogic/weblogic-ejb-jar remote-client-timeout@http://www.bea.com/ns/weblogic/weblogic-ejb-jar stick-to-first-server@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' instead of 'reference-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' here in element weblogic-enterprise-bean@http://www.bea.com/ns/weblogic/weblogic-ejb-jar:<null>
    at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:234)
    at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:221)
    at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:146)
    at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:306)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:788)
    Truncated. see log file for complete stacktrace
    I am clearly missing items in the weblogic-ejb-jar.xml. If anyone has a sample or tips, that would be awesome as a starting point.

    Those tags just declare that you are using our CMP provider and that
    your descriptor is in META-INF/weblogic-cmp-rdbms-jar.xml.
    FWIW, you might also want to check out EJBGen. It tends to keep more up
    to date with WLS than xdoclet.
    -- Rob
    Gen wrote:
    I am using xdoclets to generate descriptor file weblogic-ejb-jar.xml
    for a BMP entity bean. Xdoclet is generating the descriptor file
    alright, but is putting the following extra tags. This happens even
    for samples which come with the download, so my tags in java file are
    not wrong.
    My question is, are the extra tags below harmless, or should I
    manually go to each desciptor file and remove them?
    Thanks.
    ----------- EXTRA TAGS GENERATED START ---------
    persistence> <persistence-type>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-type>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    </persistence-use>
    </persistence>
    ----------- EXTRA TAGS GENERATED END ---------
    ----------- TAGS I PUT IN JAVA CLASS START --------
    * @ejb:bean name="com.ejb.entity.Customer"
    * jndi-name="com.ejb.entity.CustomerHome"
    * view-type="remote"
    * type="BMP"
    * primkey-field="com.ejb.entity.CustomerPK"
    * reentrant="false"
    * @weblogic:cache
    * max-beans-in-cache="1000"
    * read-timeout-seconds="900"
    * concurrency-strategy="ReadOnly"
    ----------- TAGS I PUT IN JAVA CLASS END --------

  • How to call the secured EJB from timer ejb timedout method.

    Hi All,
    I have a couple of questions on EJB 3.1 Timer Service.
    1. How to call the secured EJB (annotated @RolesAllowed) from Timer EJB @Timeout Method?
    2. What's the default role/principal with which the Timer @Timeout Method gets called?
    Please let me know any info regarding the same.
    Thanks,
    Suresh

    I'd start here:
    http://ant.apache.org/manual/index.html
    If that doesn't help, go to the table of contents and start poking around. You don't need to read the whole thing front to back, but if you're not willing to spend some time researching and reading, you're not going to get very far.

  • Getting EJBLocal.remove Exception

    Hi All,
    I am trying to remove using local object.remove method in my session bean. But getting the following Exception.
    TransactionRolledBackException : java.ejb.EJBLocal.remove Exception caused by ......................
    Illegal Argument Exception...........
    I am using Entity Bean and i have an entity Goal containing composite key. And I have set the setters for all fields in this entity except the two primary keys.
    While the getters for these to primary keys are set as local.
    What is the reason behind this error...........
    Appreciate any help......

    Can you post the actual stack trace? Thanks.
    --ken
    Kenneth Saks
    J2EE SDK Team
    SUN Microsytems

  • Creation error of EJB

    Hi!
    I ran into the following problem when referencing the public parts of
    an external j2ee library project stored in the NWDI. Specifically I would
    like to reference an API part for having a correct build path during development.
    Unfortunately I can create this reference but afterwards the NWDS tells
    me that it requires to rebuild the ejb-jar.xml and the ejb-j2ee-engine.xml.
    This automated refactoring leaves me with two 'empty' files, having all
    my ejb definitions removed.
    I tried to define new stateless ejbs by creating them via the context menu
    and ran into the error 'Not able to create Session Bean'. In order to find out
    what happened, I checked the .log file of the NWDS in my workspace folder
    and found the following lines:
    com.tssap.j2ee.ui.ejb.external.EjbCreationException: Creation error of EJB
         at com.tssap.j2ee.ui.ejb.external.EjbFactory.createSessionBean(EjbFactory.java:304)
         at com.tssap.j2ee.ui.ejb.external.EjbFactory.createSessionBean(EjbFactory.java:91)
         at com.tssap.j2ee.ui.perspective.core.action.CreateEjbInPackageActionProvider$CreateStatelessSessionBeanInPackageAction.run(CreateEjbInPackageActionProvider.java:468)
         at com.tssap.selena.model.extension.action.SelenaActionCollector$GenericElementActionWrapper.run(SelenaActionCollector.java:224)
         at com.tssap.util.ui.menu.MenuFactory$MuSiAction.saveRunAction(MenuFactory.java:1425)
         at com.tssap.util.ui.menu.MenuFactory$MuSiAction.run(MenuFactory.java:1407)
         at com.tssap.util.ui.menu.MenuFactory$DelegateAction.processInternal(MenuFactory.java:616)
         at com.tssap.util.ui.menu.MenuFactory$DelegateAction.access$100(MenuFactory.java:586)
         at com.tssap.util.ui.menu.MenuFactory$DelegateAction$BusyProcessWorker.run(MenuFactory.java:716)
         at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
         at com.tssap.util.ui.menu.MenuFactory$DelegateAction.process(MenuFactory.java:610)
         at com.tssap.util.ui.menu.internal.MenuListenerFactory$ProcessAdapter.widgetSelected(MenuListenerFactory.java:172)
         at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
         at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
         at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
         at com.tssap.util.startup.WBLauncher.run(WBLauncher.java:79)
         at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858)
         at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
         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:324)
         at com.sap.ide.eclipse.startup.Main.basicRun(Main.java:291)
         at com.sap.ide.eclipse.startup.Main.run(Main.java:789)
         at com.sap.ide.eclipse.startup.Main.main(Main.java:607)
    Nested exception -
    com.tssap.j2ee.model.J2eeCreateException: Creation error of EJB
         at com.tssap.j2ee.model.ejb.impl.EjbProject.createSessionBean(EjbProject.java:155)
         at com.tssap.j2ee.model.ejb.impl.EjbModule.createSessionBean(EjbModule.java:385)
         at com.tssap.j2ee.ui.ejb.wizard.internal.CreationFactorySemanticAPI.createEJB(CreationFactorySemanticAPI.java:115)
         at com.tssap.j2ee.ui.ejb.wizard.internal.CreationFactorySemanticAPI.createSessionBean(CreationFactorySemanticAPI.java:55)
         at com.tssap.j2ee.ui.ejb.external.EjbFactory.createSessionBean(EjbFactory.java:301)
         at com.tssap.j2ee.ui.ejb.external.EjbFactory.createSessionBean(EjbFactory.java:91)
         at com.tssap.j2ee.ui.perspective.core.action.CreateEjbInPackageActionProvider$CreateStatelessSessionBeanInPackageAction.run(CreateEjbInPackageActionProvider.java:468)
         at com.tssap.selena.model.extension.action.SelenaActionCollector$GenericElementActionWrapper.run(SelenaActionCollector.java:224)
         at com.tssap.util.ui.menu.MenuFactory$MuSiAction.saveRunAction(MenuFactory.java:1425)
         at com.tssap.util.ui.menu.MenuFactory$MuSiAction.run(MenuFactory.java:1407)
         at com.tssap.util.ui.menu.MenuFactory$DelegateAction.processInternal(MenuFactory.java:616)
         at com.tssap.util.ui.menu.MenuFactory$DelegateAction.access$100(MenuFactory.java:586)
         at com.tssap.util.ui.menu.MenuFactory$DelegateAction$BusyProcessWorker.run(MenuFactory.java:716)
         at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
         at com.tssap.util.ui.menu.MenuFactory$DelegateAction.process(MenuFactory.java:610)
         at com.tssap.util.ui.menu.internal.MenuListenerFactory$ProcessAdapter.widgetSelected(MenuListenerFactory.java:172)
         at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
         at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
         at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
         at com.tssap.util.startup.WBLauncher.run(WBLauncher.java:79)
         at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858)
         at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
         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:324)
         at com.sap.ide.eclipse.startup.Main.basicRun(Main.java:291)
         at com.sap.ide.eclipse.startup.Main.run(Main.java:789)
         at com.sap.ide.eclipse.startup.Main.main(Main.java:607)
    Does anyone has been confronted with such an error before and could give
    me a hint about how to solve this problem.
    Kind regards,
      Christian Kreutzfeldt

    I resolved the problem myself by creating a new library project where I added
    the libraries stepwise until building the referencing project failed. The library
    project contains the hibernate framework which includes a file named jboss-j2ee.jar.
    In some way or another this conflicts with the NWDS which leads to failures
    when updating the ejb-jar.xml and ejb-j2ee-engine.xml files.

  • Stateless EJB is null using TimerService

    Hi,
    I created a stateless ejb using TimerService to run it in weblogic 10.3. After deploying it, I could not get the ejb instantiated properly. The code is as below.
    Could anyone explain what is missing?
    Thanks in advance.
    //=================================================
    public interface ReconTimer {
    public void createTimer();
    //================================================
    import static javax.ejb.TransactionAttributeType.NOT_SUPPORTED;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    import javax.annotation.Resource;
    import javax.ejb.EJB;
    import javax.ejb.Stateless;
    import javax.ejb.Timeout;
    import javax.ejb.Timer;
    import javax.ejb.TimerService;
    import javax.ejb.Local;
    import javax.ejb.TransactionAttribute;
    import javax.ejb.TransactionManagement;
    import javax.ejb.TransactionManagementType;
    @Stateless (name="ReconTimerBean")
    @Local (ReconTimer.class)
    @TransactionManagement(value=TransactionManagementType.BEAN )
    @TransactionAttribute(value=NOT_SUPPORTED)
    public class ReconTimerBean implements ReconTimer {
         private static final Log log = LogFactory.getLog(ReconTimerBean.class);
    @Resource
    TimerService timerService;
    public void createTimer() {
         log.info("Crating timer");
         log.info("timerService [" + timerService + "]");
    Timer timer = timerService.createTimer(20000,
    "Created new timer");
    @Timeout
    public void timeout(Timer timer) {
    log.info("Timeout occurred !!!");
    ========================================
    client code:
    @EJB(beanName="ReconTimerBean")
    ReconTimer timerBean
    if (timerBean != null)
    timerBean.createTimer();
    else log.error ("Timer Bean is null !!!");
    Error is always logged when the bean is deployed.
    ======================================
    weblogic-ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/weblogic-ejb-jar"
         xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://www.bea.com/ns/weblogic/weblogic-ejb-jar http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd">
    <weblogic-enterprise-bean>
    <ejb-name>ReconTimerBean</ejb-name>
         <stateless-session-descriptor>
              <pool>          
                   <max-beans-in-free-pool>1</max-beans-in-free-pool>          
                   <initial-beans-in-free-pool>1</initial-beans-in-free-pool>     
              </pool>
         </stateless-session-descriptor>
    <jndi-name>app-recon-bean</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>

    Hi Ashley,
    The Dependency injection has some limitations as well…Please referto the following link: (Web Component Classes That Support Annotations)
    http://download.oracle.com/docs/cd/E13222_01/wls/docs100/webapp/annotateservlet.html
    …Which says that DI is not possible from every web component.
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com/ejbs_weblogic/#comment-165  (Dependency Injection Issues)

Maybe you are looking for

  • How to change the Form field in Outlook 2011 for Mac ?

    Hey, I have Outlook 2011 on my Mac, and using Exchngae server 2008 for my emails.  In the exchnage server I have few differnet domain whic I use, In Microsoft Outllok I just can add the "Form" filed and change the email from whom I send, How can I de

  • What's wrong with Acrobat compression

    Why is it impossible to substantially reduce the file size in Acrobat Pro (version 9, but vitrually the same problem in all previous versions). I have a file that is 95MB after compression in Acrobat 9. Why is it that I have to open this file in Acro

  • DIAdem 2014 sql_execDi​rect() type mismatch

    I need to convert a *.sud file (which currently works in DIAdem 11) to DIAdem 2014. Need your help please. When I execute the sud file, it gave the following errors: Error in <graphTool.sud, graphDlg> (Line: 1411, column: 3): SU event context:  Dialo

  • The maximum report processing jobs limit configured reach

    Getting error "The maximum report processing jobs limit configured by your system administrator has been reached." after running a number of reports. The problem clears up when I issue an IISreset. Environment - Windows 2008 Server. - 3 x ASP .Net ap

  • I need to export an XML but the option is not there for me to do so! Help..

    I need to export an xml from final cut pro x. The 'File - Export XML' option isnt there?? I have Final Cut Pro X Version 10.0.. Can anyone help?