Applicate Remote EJB Client

Hello,
I am getting to know EJB and have started with it from a Pocket Book and has started to implement and example suggested by this website: http://www.laliluna.de/articles/ejb-3-tutorial-jboss.html.
Coming to the client part, maybe incorrectly by my part or particular to the cited website's example, I see a strong coupling on the EJB client to the Remote Interface and the actual SessionBean which I could only see sufficed by having the client on the same "project" of the EJB. Therefore I ask you, is there a way to have the EJB client on a different project, even on a different app. server than the Session Bean?
Thank you for your help,
TS

the only thing you need in the client is the remote interface.
So to share this interface between a client and a server application, you could put those interfaces in a separate library jar and share that between the two projects.

Similar Messages

  • How to get remote ejb client working with Weblogic 8.1?

    I have Weblogic 8.1 running on a WinXP box behind my firewall. Port 7001 is open to WL and remote browsers can access the console.
    I have a client machine running WinXP on a different network that is remote to the WL server. It can ping the WL server machine.
    I use JVM 1.4.2_08 on all machines.
    If I put my client machine on the LAN with the WL server, then my EJB test client works fine. If I put the client machine on the remote network then the test client fails with a ClassCastException when trying to do a PortableRemoteObject.narrow on the bean home.
    I had this running fine on JBoss 3.22 using RMI over HTTP. I added an HTTP invoker service to my jboss.xml file. I don't know if something similar is needed on the Weblogic side - any ideas on that? All I've done on the WL side is turn on Tunneling - which obviously works because the remote client gets a correct home object when doing a lookup on the bean - based on the IOR string of the home obj.
    Below I include my client code, exception, ejb-jar.xml and my weblogic-ejb-jar.xml.
    Any ideas on what else needs to be done so that a remote client can do a PortableRemoteObject.narrow? My client.jar has all of the EJB classes, and runs fine when run from LAN.
    Thanks,
    --BobC
    Client Code
    Properties p = new Properties();
    p.put("java.naming.factory.initial", "weblogic.jndi.WLInitialContextFactory");
    p.put("java.naming.provider.url", "http://66.114.140.213:7001");
    InitialContext ic = new InitialContext(p);
    // Test register bean
    Object homeObj = ic.lookup("tacplanner/register");
    RegisterHome home = (RegisterHome) PortableRemoteObject.narrow(homeObj, RegisterHome.class); // <<< ClassCastException here
    Exception
    java.lang.ClassCastException
    at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
    at com.nimblus.tacplanner.test.TestUtils.<init>(TestUtils.java:60)
    at com.nimblus.tacplanner.test.TestUtils.main(TestUtils.java:196)
    ejb-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>register</ejb-name>
    <home> com.nimblus.tacplanner.server.ejb.stateless.RegisterHome</home>
    <remote> com.nimblus.tacplanner.server.ejb.stateless.Register</remote>
    <ejb-class>com.nimblus.tacplanner.server.ejb.stateless.RegisterSession</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <resource-ref>
    <description>The Oracle Datasource</description>
    <res-ref-name>java:/OracleDS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>register</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </ejb-jar>
    weblogic-ejb-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN'
    'http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>register</ejb-name>
    <stateless-session-descriptor>
    <pool>
    <max-beans-in-free-pool>100</max-beans-in-free-pool>
    </pool>
    </stateless-session-descriptor>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jdbc/OracleDS</res-ref-name>
    <jndi-name>OracleDS</jndi-name>
    </resource-description>
    </reference-descriptor>
    <enable-call-by-reference>True</enable-call-by-reference>
    <jndi-name>tacplanner/register</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    --------------------

    Problem solved.
    For remote clients you need to generate and use the stub classes for EJB interfaces using Weblogic's appc utility.
    See: "http://e-docs.bea.com/wls/docs81/ejb/appc_ejbc.html#1151900"
    --BobC                                                                                                                                                                                                                                                                                                                                                                                                                               

  • GlassFish, JAAS Login Module - get remote ejb clien IP address

    How to get remote ejb client IP in my custom JAAS login module if I use Glassfish?
    Edited by: NoName on Sep 23, 2009 4:06 AM

    Hi,
    Try configuring wdisp/add_xforwardedfor_header in web dispatcher as described here:
    http://help.sap.com/saphelp_nw04/helpdata/en/de/89023c59698908e10000000a11402f/content.htm
    And configuring ClientIpHeaderName on the java server as described here:
    http://help.sap.com/saphelp_nw04/helpdata/en/52/46f6a089754e3a964a5d932eb9db8b/content.htm
    Regards,
    Maria

  • Stand alone client for remote EJB corba error

    Regarding problem below, I've checked System env variables
    that weblogic server is using for CORBA classes:
    javax.rmi.CORBA.UtilClass=weblogic.iiop.UtilDelegateImpl
    org.omg.CORBA.ORBSingletonClass=weblogic.corba.orb.ORB
    org.omg.CORBA.ORBClass weblogic.corba.orb.ORB
    javax.rmi.CORBA.PortableRemoteObjectClass=weblogic.iiop.PortableRemoteObjectDelegateImpl
    But these are server classes and not found in wlclient.jar and wljmsclient.jar. What classes should be used for client? What needs to be set in order to get successful remote RMI/EJB call to weblogic server?
    Original post:
    I have a stand alone spring client for simple stateless session EJB deployed on weblogic 9.2. I'm using spring (jdk 1.5) to call this remote EJB and the only way I can succeed is to have full weblogic.jar in my bootstrap classpath. Otherwise I get corba error:
    CORBA BAD_PARAM 0 No; nested exception is:
    org.omg.CORBA.BAD_PARAM: vmcid: 0x0 minor code: 0 completed: No
    Interestingly, within same client I have JMS call to weblogic JMS and that fails if weblogic.jar is in boot classpath. Getting rid of weblogic.jar from boot classpath works if I have wlclient.jar and wljmsclient.jar in regular classpath (as per weblogic docs). I would think that for stand alone client all I would need is to weblogic client jars, why should I need to have full weblogic.jar?
    I can't get those work together with same classpath. I wonder if anybody has some pointers and/or advice. I was looking to set system parameters for corba for weblogic client that maybe could help:
    org.omg.CORBA.ORBClass
    org.omg.CORBA.ORBSingletonClass
    javax.rmi.CORBA.UtilClass
    javax.rmi.CORBA.StubClass
    javax.rmi.CORBA.PortableRemoteObjectClass
    But I can't find definitive answer.
    Regards,
    -pp
    Edited by mr.papini at 06/28/2007 9:05 AM

    I'm stuck exactly with the same issue while trying to port my application from weblogic to jboss.
    I tried to specify different ORB implementations (JacORB, OpenORB) for jvm option org.omg.CORBA.ORBClass, but JBoss couldn't get them instantiated. Native Sun implementation which is used in JBoss by default and can be instantiated, apparently is not fully compatible with weblogic security module.
    So did you manage to find out the solution?
    Edited by DigitalDude at 04/09/2008 11:47 PM

  • Error in running EJB Client on a remote machine

    I delploy my beans and can run the EJB Client locally. However when I try to run the Client on another machine, there are errors.
    Here is the errors
    Syntax error
    Out of environment space
    Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/enterprise/appclient/Main
    I have follow the step in the j2ee tutorial and set the env variables according. Here is the bat file I write
    set APPCPATH=CBSAppClient.jar
    set VMARGS=-Dj2eelogin.name=guest -Dj2eelogin.password=guest123 -Dorg.omg.CORBA.ORBInitialHost=192.168.0.2
    runclient -client CBSApp.ear -name CBSClient -textauth
    Do anyone facing the same problem with me?
    And how can I solve the problems?
    This is really URGENT, please help

    You are running on Windows 9x or Me, right? The darn OS has 300 or so bytes allocated for environment by default.
    Try setting the Initial environment to 4096 in the Properties|Memory tab for the batch file. That will get rid of "Out of environment space". The syntax error is another matter; Windows (except NT and derivatives) shells do not allow '=' in an environment variables value. You cannot overcome that. Some software (Sybase for instance) interprets # as = just because of that. Unfortunately, the JVM doesn't take such an approach.
    Better, grab copies of Unix utilities for Windows (www.gnu.org) including the wonderful shell 'bash' and write .sh scripts, which are inherently more powerful.

  • Using JarSettings to generate EJB client jar, but supported classes missed

    Appreciated for any comments in advance.
    I am using @jarSetting to generate EJB client jar file from workshop 9.2. The remote method of EJB has one input parameter that is defined as an interface. The interface is included in client jar, but the implementation of this interface is not.
    Please advise how I can add the implementation of this interface to client jar?
    Best Regards,
    James

    Hi James,
    I believe the algorithm for creating the client jar is to simply inspect the EJB interfaces using reflection and to include all user defined classes and exceptions that are referenced by the interfaces. In your case, it sounds like a class is not being included because it is not directly referenced by one of the EJB interfaces.
    I think the client jar creation algorithm can be described as "best effort" and unfortunately, it does not always end up including all classes needed by the client. I would recommend you add the additional classes manually using the jar tool.
    - Matt

  • How can I run EJB Client in other computer ?

    Hello,
    I'm trying to run converter examples.
    if ejb client pgm resides on a same machine with j2ee server , it works fine.
    But when I put client pgm on a different maching
    below message show.
    No application client descriptors defined for: ConverterClinet
    I put ConverterApp.ear, ConverterAppClient.jar and ConverterClient.class on the machine and
    set APPCPATH=ConverterAppClient.jar
    set VMARGS=-Dorg.omg.CORBA.ORBInitialHost=xxx.xxx.xx.xx
    What should I do to run ejb client on different machine?

    Hi SangHPark,
    I had the same problem but have solved it and it works.
    I ran the client remotely from a win98 box.
    Keep two things in mind
    1> Deploy the applications to an ip address and not to the local host using the deploy too. Use the deploy tool Gui to add a new server and then deploy the application to this ip address.
    2> I am running j2ee version 1.3 and jsdk 1.3
    Use the following code but instead of using "java:comp/env/ejb/SimpleConverter" use the jndi name of the object: "MyConverter" as specified in the tutorial.
    Properties prop = new Properties();
    prop.setProperty(Context.INITIAL_CONTEXT_FACTORY,"com.sun.enterprise.naming.SerialInitContextFactory");
    prop.setProperty(Context.PROVIDER_URL,"IIOP://xxx.xx.x.xxx:1050");
    System.out.println("Attempting to create context...");
    Context initial = new InitialContext(prop);
    // Instead of this use the below line of code
    //Object objref = initial.lookup("java:comp/env/ejb/SimpleConverter");
    Object objref = initial.lookup("MyConverter");
    // MyConverter is the Jndi name of the ConverterBean as per the tutorial
    You need to do the following things.
    1> After making changes to the code recompile using Ant and redeploy it.
    2> Copy the j2ee.jar, ConverterAppClient.jar and ConverterClient.class file to the machine that u want to run the client from.
    3> create a directory called "config" on the remote machine where you copied the files in step two.
    4> Copy to this directory the files ejb.properties and security.properties from your j2ee_home\config\ directory.
    For example you copied the files in step 2 on the remote machine in the c:\test directory. Create c:\test\config directory and copy the files from step 4 into this directory.
    5> Run the following command from the directory where u copied the client files
    java -Dorg.omg.CORBA.ORBInitialHost="host name" -classpath .\j2ee.jar;.;.\ConverterAppClient.jar ConverterClient
    Monal

  • Problem calling a method in a servlet witch returns remote ejb

    Hi, I have a problem combining servlets ands ejbs, I expose my problem :
    What I have :
    1 . I have a User table into a SGBD with two attributes login and pass.
    2 . I have a UserBean linked to User table with a remote interface
    3 . I have a stateless UserSessionBean with a remote interface
    4 . I have a UserServlet linked to a jsp page which allows me to add users
    5 . I use Jboss
    What is working ?
    1 - I have a method newUser implemented in my UserSessionBean :
    public class UserSessionBean implements SessionBean {
      private SessionContext sessionContext;
      private UserRemoteHome userRemoteHome;
      public void ejbCreate() throws CreateException {
      // Initialize UserRemoteHome
      // Method to add a new user
      public UserRemote newUser(String login, String password) {
            UserRemote newUser = null;
            try {
                newUser = userRemoteHome.create(login, password);
            } catch (RemoteException ex) {
                System.err.println("Error: " + ex);
            } catch (CreateException ex) {
                System.err.println("Error: " + ex);
            return newUser;
    }2 - When I test this method with a simple client it works perfectly :
    public class TestEJB {
        public static void main(String[] args) {
            Context initialCtx;
            try {
                // Create JNDI context
                // Context initialization
                // Narrow UserSessionHome
                // Create UserSession
                UserSession session = sessionHome.create();
                // Test create
                UserRemote newUser = session.newUser("pierre", "hemici");
                if (newUser != null) {
                    System.out.println(newUser.printMe());
            } catch (Exception e) {
                System.err.println("Error: " + e);
                e.printStackTrace();
    Result : I got the newUser printed on STDOUT and I check in the User table (in the SGBD) if the new user has been created.
    What I want ?
    I want to call the newUser method from the UserServlet and use the RemoteUser returned by the method.
    What I do ?
    The jsp :
    1 - I have a jsp page where a get information about the new user to create
    2 - I put the login parameter and the password parameter into the request
    3 - I call the UserServlet when the button "add" is pressed on the jsp page.
    The Servlet :
    1 - I have a method doInsert which call the newUser method :
    public class UserServlet extends HttpServlet {
        private static final String CONTENT_TYPE = "text/html";
        // EJB Context
        InitialContext ejbCtx;
        // Session bean
        UserSession userSession;
        public void init() throws ServletException {
            try {
                // Open JNDI context (the same as TestClient context)
                // Get UserSession Home
                // Create UserSession
                userSession = userSessionHome.create();
            } catch (NamingException ex) {
                System.out.println("Error: " + ex);
            } catch (RemoteException ex) {
                System.out.println("Error: " + ex);
            } catch (CreateException ex) {
                System.out.println("Error: " + ex);
        protected void service(HttpServletRequest req, HttpServletResponse resp) throws
                ServletException, IOException {
         * Does insertion of the new user in the database.
        public void doInsert(HttpServletRequest req, HttpServletResponse resp) throws
                ServletException, IOException {
            try {
                // Get parameters to create the newUser
                String login = req.getParameter("login");
                String password = req.getParameter("password");
               // Create the newUser
                System.out.println("Calling newUser before");
                UserRemote user = userSession.newUser(login, password);
                System.out.println("Calling newUser after");
            } catch (Exception e) {
        // Clean up resources
        public void destroy() {
    Result :
    When I run my jsp page and click on the "add" button, I got the message "Calling newUser before" printed in STDOUT and the error message :
    ERROR [[userservlet]] Servlet.service() for servlet userservlet threw exception
    javax.servlet.ServletException: loader constraints violated when linking javax/ejb/Handle class
         at noumea.user.UserServlet.service(UserServlet.java:112)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
         at java.lang.Thread.run(Thread.java:534)
    Constat :
    I checked into my SGBD and the new user has been created.
    The error appears only when the method return Remote ejbs, if I return simples objects (Strings, int..) it works.
    What can I do to resolve this problem ?
    Thank you.

    "Why do you want to servlet to gain access to another EJB through the stateless session bean. Why cant the servlet call it directly ?"
    Because I want to access to the informations included in the entity bean UserBean (which is remote).
    You said that it is a bad design, but how can I access to my UserBean ejbs from the session bean if I don't do that ?
    For example I want a List of all users to be seen in a jsp page :
    1 - I call the method getUserList which returnsan ArrayList of UserRemote.
    2 - I iterate over the ArrayList to get the users parameters to be seen.
    As the other example (newUser), when I do
    ArrayList users = (ArrayList) userSession.getUserList(); with the simple client it works, but in the servlet I got the same error.
    But, if I call directly the findAll method (as you'are saying) in the servlet
    ArrayList users = (ArrayList) userRemoteHome.findAll(); it works...
    I think that if my servlet calls directly entity ejbs, I don't need UserSession bean anymore. Is that right ?
    I precise that my design is this :
    jsp -> servlet -> session bean -> entity bean -> sgbd
    Is that a bad design ? Do I need the session bean anymore ?
    Thank you.

  • Using a remote Ejb as a datacontrol for ADF

    Hi,
    I am trying to create an EJB 3.0 Data Control on top of remote deployed EJB. Difficulty is that I have no control over the EJB, and all I've been given is a Client jar file containing the remote interface and the entities used in the interface. When looking up the EJB using JNDI this is enough, so I was assuming it would also be enough to create a EJB Data Control, but it seems not.
    I've searched a lot of blogs and tutorials, but everyone seems to create the EJB's and entities from scratch.
    So the question is: how to create an EJB 3.0 Data Control based on just a Remote Interface?
    I tried the following:
    =============
    1. Create a new Fusion Web Application
    2. Add the EJB Client jar to the classpath. If you select "Show Libraries" in the Project Navigator, you can drill down to the Remote Interface class in the EJB Client jar. When you right-click the Remote Interface, there is an option to "Create Data Control", but that doesn't work for .class files. And even if you have the .java source file there, it will generate a POJO Data Control, which is obviously not what we want.
    After some time I found the following workaround:
    ===============================
    3. Create a Session Bean with exact same package and name in the Model project, and make sure its remote interface is the same as the given Remote EJB. Then generate a EJB 3.0 Data Control on top of that
    4. Then via file system remove the Session Bean and interface from Model project, so the Data Control will use the one on the classpath
    5. Update DataControls.dcx with jndi-name and provider-url from Remote EJB
    6. Remove <ejb-ref> from web.xml to avoid deployment issues.
    Problem is that in our project there are many of these Remote EJBs, and they are also work in progress. Means the remote interfaces are changing all the time, and then all of the above steps have to be performed. Isn't there an easier way, like the behaviour I was expecting in step 2?
    Thanks for any suggestions.

    ADF needs to be able to access the source of the facade to create the data control, so the recommended way is to have a project that contains the actual EJB and from it create the data control.
    This shouldn't be a problem assuming that you and the people who provide the EJB all work in the same company.
    You should be able to change the location of the EJB that you access at runtime by modifying the datacontrol definition after it has been created.
    Note also that if your EJBs are constantly changing you'll also need to update your data controls to leverage changes you need.

  • Error during lookup of remote ejb CaseService - Oracle ACM 12C Standalone

    StandAlone Setup:
    CD %ORACLE_HOME%\soa\common\bin
    set QS_TEMPLATES=%ORACLE_HOME%\soa\common\templates\wls\oracle.soa_template_12.1.3.jar, %ORACLE_HOME%\osb\common\templates\wls\oracle.osb_template_12.1.3.jar
    qs_config.cmd
    Then ran config.cmd from WLS and extended BPM domain, then was able to see composer app in deployment.
    AdminServer Args:
    set USER_MEM_ARGS=-Xms512m -Xmx3096m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=1024m
    Error
    ====
    Error during ejb lookup from bpm services client.
    Error during lookup of remote ejb CaseService .
    Contact Oracle support if exception can not be fixed.
            at oracle.bpm.client.impl.casemgmt.CaseManagementServiceRemoteClient.get
    CaseService(CaseManagementServiceRemoteClient.java:86)
            at oracle.bpm.casemgmt.customactivity.notification.NotificationCallbackU
    til.getCaseService(NotificationCallbackUtil.java:158)
            at oracle.bpm.casemgmt.customactivity.notification.NotificationCallbackU
    til.isActivityRegistered(NotificationCallbackUtil.java:167)
            at oracle.bpm.casemgmt.customactivity.notification.NotificationCallbackU
    til.registerEmailActivity(NotificationCallbackUtil.java:83)
            at oracle.bpm.casemgmt.fabric.CaseManagementServiceEngine.stateChanged(C
    aseManagementServiceEngine.java:1340)
            at oracle.integration.platform.blocks.mesh.FabricLifecycle.notifyListene
    rs(FabricLifecycle.java:54)
            at oracle.integration.platform.blocks.mesh.FabricLifecycle.setState(Fabr
    icLifecycle.java:41)
            at oracle.integration.platform.blocks.mesh.MeshImpl.postDeployInit(MeshI
    mpl.java:204)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:606)
            at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
    on(AopUtils.java:318)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
    inpoint(ReflectiveMethodInvocation.java:183)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
    ReflectiveMethodInvocation.java:150)
            at oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEven
    tAspect.java:71)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
    ReflectiveMethodInvocation.java:172)
            at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
    cAopProxy.java:202)
            at com.sun.proxy.$Proxy324.postDeployInit(Unknown Source)
            at oracle.integration.platform.kernel.FabricKernelInitializerServlet$1.r
    un(FabricKernelInitializerServlet.java:1008)
            at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run
    (WorkManagerExecutor.java:184)
            at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManag
    er.java:184)
            at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Caused By: javax.naming.NameNotFoundException: While trying to lookup 'ejb.bpm.c
    ase.CaseService' didn't find subcontext 'bpm'. Resolved 'ejb'; remaining name 'b
    pm/case/CaseService'
            at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(Basic
    NamingNode.java:1180)
            at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.jav
    a:265)
            at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.j
    ava:187)
            at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:21
    0)
            at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:22
    4)
            at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.j
    ava:253)
            at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:426)
            at javax.naming.InitialContext.lookup(InitialContext.java:411)
            at oracle.bpm.client.impl.casemgmt.CaseManagementServiceRemoteClient.get
    CaseService(CaseManagementServiceRemoteClient.java:80)
            at oracle.bpm.casemgmt.customactivity.notification.NotificationCallbackU
    til.getCaseService(NotificationCallbackUtil.java:158)
            at oracle.bpm.casemgmt.customactivity.notification.NotificationCallbackU
    til.isActivityRegistered(NotificationCallbackUtil.java:167)
            at oracle.bpm.casemgmt.customactivity.notification.NotificationCallbackU
    til.registerEmailActivity(NotificationCallbackUtil.java:83)
            at oracle.bpm.casemgmt.fabric.CaseManagementServiceEngine.stateChanged(C
    aseManagementServiceEngine.java:1340)
            at oracle.integration.platform.blocks.mesh.FabricLifecycle.notifyListene
    rs(FabricLifecycle.java:54)
            at oracle.integration.platform.blocks.mesh.FabricLifecycle.setState(Fabr
    icLifecycle.java:41)
            at oracle.integration.platform.blocks.mesh.MeshImpl.postDeployInit(MeshI
    mpl.java:204)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:606)
            at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
    on(AopUtils.java:318)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
    inpoint(ReflectiveMethodInvocation.java:183)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
    ReflectiveMethodInvocation.java:150)
            at oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEven
    tAspect.java:71)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
    ReflectiveMethodInvocation.java:172)
            at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
    cAopProxy.java:202)
            at com.sun.proxy.$Proxy324.postDeployInit(Unknown Source)
            at oracle.integration.platform.kernel.FabricKernelInitializerServlet$1.r
    un(FabricKernelInitializerServlet.java:1008)
            at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run
    (WorkManagerExecutor.java:184)
            at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManag
    er.java:184)
            at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    >
    Please help. The problem does not occur with Integrated WLS. I think the config scripts are correctly running from JDev.

    Hi,
    It's not easy to tell what's wrong with your example.
    Maybe you could send me a zip and I'll check when I have some time.
    By the way, you're asking a question about the lookup of an EJB3, I wrote an article that covers that topic.
    It should give you some interesting input.
    http://m-button.blogspot.com/2008/07/reminder-on-how-to-use-ejb3-with.html
    Regards.

  • Multiple EJB clients blocking

    I tried to ask this question a few months ago, but I must not have given enough
    details
    for anyone to even guess what my problem might be. So I created a simple example
    to
    demonstrate what's happening.
    I have a cluster of 2 WL servers (7.0) running on Linux. When I call an EJB multiple
    times at once from different threads in a client application, sometimes all the
    threads
    finish in a few milliseconds, but other times at least one of the threads will
    pause
    for 60 seconds before finishing. There are no error or warning indicators in any
    server
    log files. I'm trying to do something very simple: add one to a number in a database
    table without letting any two clients get the same number.
    I'm using DB2 as my database and COM.ibm.db2.jdbc.app.Driver as my driver. I have
    a
    JDBC connection pool and a DataSource, which I'm using in a stateless session
    bean.
    I lock the table in exclusive mode, query the current number, and add one to it.
    I'm
    using container-managed transactions, so I'm relying on the container to commit
    the
    update when the method ends. (I tried using a bean-managed transaction, and I
    got the
    same results.)
    For a long time I believed the problem must be with DB2, but when I put the exact
    same
    code in a JSP, it works just fine. So I know that DB2 can do what I'm asking it
    to do.
    I also tried it on a Windows NT server, and it behaves exactly the same. Comparing
    thread dumps of the two servers in the cluster taken during one of these 60 second
    wait periods doesn't show any obvious problems: the two servers both have exactly
    the
    same threads going, and they all seem pretty reasonable to me.
    Here is the code for my EJB:
    package com.davisvision.cv;
    import java.sql.*;
    import javax.ejb.*;
    public class SimpleBean implements SessionBean {
    SessionContext ctx;
    public void ejbCreate() {
    public void ejbPostCreate() {
    public void ejbRemove() {
    public void ejbActivate() {
    public void ejbPassivate() {
    public void setSessionContext(SessionContext c) {
    ctx = c;
    public int nextNumber() {
    String tableName = "TEST.PROVIDER_SPAWN";
    Connection con = null;
    int num = 0;
    try {
    con = CvDatabase.getConnection();
    con.setAutoCommit(false);
    Statement stmt = con.createStatement();
    stmt.executeUpdate("LOCK TABLE " + tableName + " IN EXCLUSIVE MODE");
    ResultSet rs = stmt.executeQuery("SELECT NEXT_OFFICE_NUM FROM "
    + tableName + " WHERE PROVIDER_TYPE = 'DAVIS2'");
    if (rs.next()) {
    num = rs.getInt(1);
    num++;
    int updated = stmt.executeUpdate("UPDATE " + tableName
    + " SET NEXT_OFFICE_NUM = " + num
    + " WHERE PROVIDER_TYPE = 'DAVIS2'");
    catch(Exception e) {
    num = -1;
    Logger.writeDated(Logger.FATAL, "SimpleBean.nextNumber: " + e);
    finally {
    CvDatabase.close(con);
    return num;
    And here is my client application:
    package test;
    import com.davisvision.cv.*;
    import java.util.*;
    import javax.ejb.*;
    import javax.naming.*;
    import javax.rmi.PortableRemoteObject;
    public class TestSimpleBean implements Runnable {
    static InitialContext ctx;
    public int taskNum;
    static void getContext() {
    Properties env = new Properties();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, "t3://weblogictest:7055");
    try {
    ctx = new InitialContext(env);
    catch(NamingException e) {
    System.out.println("Unable to obtain an initial JNDI context:
    " + e);
    public void run() {
    System.out.println("Thread " + taskNum + " started.");
    try {
    Object obj = ctx.lookup("ejb-cv-Simple");
    SimpleHome h = (SimpleHome) PortableRemoteObject.narrow(obj, SimpleHome.class);
    SimpleRemote r = h.create();
    int n = r.nextNumber();
    System.out.println("Thread " + taskNum + " next number = " + n);
    catch(Exception e) {
    System.out.println("Error in thread " + taskNum + ": " + e);
    System.out.println("Thread " + taskNum + " ended.");
    public static void main(String[] args) {
    getContext();
    int n = 3;
    TestSimpleBean x = null;
    Thread t = null;
    // start each thread
    for (int i = 0; i < n; i++) {
    x = new TestSimpleBean();
    x.taskNum = i;
    t = new Thread(x);
    t.start();
    System.out.println("" + n + " threads started.");
    My deployment descriptors are as simple as I could make them:
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC
    "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
    "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>Simple</ejb-name>
    <home>com.davisvision.cv.SimpleHome</home>
    <remote>com.davisvision.cv.SimpleRemote</remote>
    <ejb-class>com.davisvision.cv.SimpleBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>Simple</ejb-name>
    <method-name>
    </method-name>
    </method>
    <trans-attribute>
    Required
    </trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN"
    "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd" >
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>Simple</ejb-name>
    <jndi-name>ejb-cv-Simple</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    This is from part of a production application, so to make sure our users aren't
    getting
    random 60-second pauses, I have the production bean deployed on just one server
    in the
    cluster with just one bean in the pool. But I really need to find the solution
    to this
    problem before development goes much further. Any guesses, sugestions, or conjectures
    would be most welcome.
    - gary

    Oops, I didn't notice that I only attached one file last time. The thread dump
    from the other server in the cluster is attached.
    My (off-topic) Linux problem must be something else: Signaling the parent
    java process was one of the first things I tried. It may have to do with the
    way that we start WL (in the background with nohup).
    - gary
    Rob Woollen <[email protected]> wrote:
    Gary Bradshaw wrote:
    Thanks for your response, Rob. I've attached the thread dumps, hopingthat they
    will be easier to read that way. They are from a Windows NT system:Thanks. Are you sure this is the right dump? The server looks
    completely idle in this dump.
    I haven't
    yet found a way to get a thread dump on my Linux system. (I know Ishould say
    "kill -3 <processId>", but each WLS has at least 72 process IDs. MaybeI just
    haven't found the right one yet.)Try ps -ef --forest  .  It'll show you graphically with a little ascii
    art the parent process/thread.
    -- Rob
    Your suggestion to do the update first would work for this particularexample
    since I know I always want to add 1 to the number, but in other similarsituations
    I will want to vary the update based on the values I find in the row.I'm looking
    for a clean way to safely do multi-user updates with JDBC. (For larger,more important
    tables I'm using entity beans).
    - gary
    Rob Woollen <[email protected]> wrote:
    Can you post the thread dumps?
    Also usually people do something like this:
    update mytable set count = count + 1
    select count from mytable
    -- Rob
    Gary Bradshaw wrote:
    I tried to ask this question a few months ago, but I must not havegiven enough
    details
    for anyone to even guess what my problem might be. So I created a
    simple
    example
    to
    demonstrate what's happening.
    I have a cluster of 2 WL servers (7.0) running on Linux. When I callan EJB multiple
    times at once from different threads in a client application, sometimesall the
    threads
    finish in a few milliseconds, but other times at least one of the
    threads
    will
    pause
    for 60 seconds before finishing. There are no error or warning indicatorsin any
    server
    log files. I'm trying to do something very simple: add one to a numberin a database
    table without letting any two clients get the same number.
    I'm using DB2 as my database and COM.ibm.db2.jdbc.app.Driver as mydriver. I have
    a
    JDBC connection pool and a DataSource, which I'm using in a statelesssession
    bean.
    I lock the table in exclusive mode, query the current number, and
    add
    one to it.
    I'm
    using container-managed transactions, so I'm relying on the containerto commit
    the
    update when the method ends. (I tried using a bean-managed transaction,and I
    got the
    same results.)
    For a long time I believed the problem must be with DB2, but when
    I
    put the exact
    same
    code in a JSP, it works just fine. So I know that DB2 can do what
    I'm
    asking it
    to do.
    I also tried it on a Windows NT server, and it behaves exactly thesame. Comparing
    thread dumps of the two servers in the cluster taken during one ofthese 60 second
    wait periods doesn't show any obvious problems: the two servers bothhave exactly
    the
    same threads going, and they all seem pretty reasonable to me.
    Here is the code for my EJB:
    package com.davisvision.cv;
    import java.sql.*;
    import javax.ejb.*;
    public class SimpleBean implements SessionBean {
    SessionContext ctx;
    public void ejbCreate() {
    public void ejbPostCreate() {
    public void ejbRemove() {
    public void ejbActivate() {
    public void ejbPassivate() {
    public void setSessionContext(SessionContext c) {
    ctx = c;
    public int nextNumber() {
    String tableName = "TEST.PROVIDER_SPAWN";
    Connection con = null;
    int num = 0;
    try {
    con = CvDatabase.getConnection();
    con.setAutoCommit(false);
    Statement stmt = con.createStatement();
    stmt.executeUpdate("LOCK TABLE " + tableName + " IN EXCLUSIVEMODE");
    ResultSet rs = stmt.executeQuery("SELECT NEXT_OFFICE_NUM
    FROM "
    + tableName + " WHERE PROVIDER_TYPE = 'DAVIS2'");
    if (rs.next()) {
    num = rs.getInt(1);
    num++;
    int updated = stmt.executeUpdate("UPDATE " + tableName
    + " SET NEXT_OFFICE_NUM = " + num
    + " WHERE PROVIDER_TYPE = 'DAVIS2'");
    catch(Exception e) {
    num = -1;
    Logger.writeDated(Logger.FATAL, "SimpleBean.nextNumber:" + e);
    finally {
    CvDatabase.close(con);
    return num;
    And here is my client application:
    package test;
    import com.davisvision.cv.*;
    import java.util.*;
    import javax.ejb.*;
    import javax.naming.*;
    import javax.rmi.PortableRemoteObject;
    public class TestSimpleBean implements Runnable {
    static InitialContext ctx;
    public int taskNum;
    static void getContext() {
    Properties env = new Properties();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, "t3://weblogictest:7055");
    try {
    ctx = new InitialContext(env);
    catch(NamingException e) {
    System.out.println("Unable to obtain an initial JNDIcontext:
    " + e);
    public void run() {
    System.out.println("Thread " + taskNum + " started.");
    try {
    Object obj = ctx.lookup("ejb-cv-Simple");
    SimpleHome h = (SimpleHome) PortableRemoteObject.narrow(obj,SimpleHome.class);
    SimpleRemote r = h.create();
    int n = r.nextNumber();
    System.out.println("Thread " + taskNum + " next number= " + n);
    catch(Exception e) {
    System.out.println("Error in thread " + taskNum +
    " + e);
    System.out.println("Thread " + taskNum + " ended.");
    public static void main(String[] args) {
    getContext();
    int n = 3;
    TestSimpleBean x = null;
    Thread t = null;
    // start each thread
    for (int i = 0; i < n; i++) {
    x = new TestSimpleBean();
    x.taskNum = i;
    t = new Thread(x);
    t.start();
    System.out.println("" + n + " threads started.");
    My deployment descriptors are as simple as I could make them:
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC
    "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
    "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>Simple</ejb-name>
    <home>com.davisvision.cv.SimpleHome</home>
    <remote>com.davisvision.cv.SimpleRemote</remote>
    <ejb-class>com.davisvision.cv.SimpleBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>Simple</ejb-name>
    <method-name>
    </method-name>
    </method>
    <trans-attribute>
    Required
    </trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN"
    "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd" >
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>Simple</ejb-name>
    <jndi-name>ejb-cv-Simple</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    This is from part of a production application, so to make sure ourusers aren't
    getting
    random 60-second pauses, I have the production bean deployed on justone server
    in the
    cluster with just one bean in the pool. But I really need to find
    the
    solution
    to this
    problem before development goes much further. Any guesses, sugestions,or conjectures
    would be most welcome.
    - gary------------------------------------------------------------------------
    Full thread dump:
    "Thread-7" daemon prio=5 tid=0x868400 nid=0x1f8 waiting on monitor[0x136ff000..0x136ffdc0]
         at java.lang.Thread.sleep(Native Method)
         at com.davisvision.cv.CvProperties.run(CvProperties.java:153)
         at java.lang.Thread.run(Thread.java:479)
    "ListenThread.Default" prio=5 tid=0x8647d0 nid=0x1f0 runnable [0x136bf000..0x136bfdc0]
         at java.net.PlainSocketImpl.socketAccept(Native Method)
         at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:463)
         at java.net.ServerSocket.implAccept(ServerSocket.java:238)
         at java.net.ServerSocket.accept(ServerSocket.java:217)
         at weblogic.socket.WeblogicServerSocket.accept(WeblogicServerSocket.java:26)
         at weblogic.t3.srvr.ListenThread.run(ListenThread.java:263)
    "ExecuteThread: '0' for queue: 'JMS.TimerTreePool'" daemon prio=5 tid=0x84d220nid=0x1e9 waiting on monitor [0x1312f000..0x1312fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '3' for queue: 'JMS.TimerClientPool'" daemon prio=5tid=0x84c040 nid=0x1e8 waiting on monitor [0x130ef000..0x130efdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '2' for queue: 'JMS.TimerClientPool'" daemon prio=5tid=0x84c580 nid=0x1e7 waiting on monitor [0x130af000..0x130afdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '1' for queue: 'JMS.TimerClientPool'" daemon prio=5tid=0x84cec0 nid=0x1a1 waiting on monitor [0x1306f000..0x1306fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '0' for queue: 'JMS.TimerClientPool'" daemon prio=5tid=0x84b370 nid=0x1a0 waiting on monitor [0x1302f000..0x1302fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "CoreHealthMonitor" daemon prio=5 tid=0x829e30 nid=0x1e6 waiting onmonitor [0x12fef000..0x12fefdc0]
         at java.lang.Thread.sleep(Native Method)
         at weblogic.t3.srvr.CoreHealthMonitorThread.run(CoreHealthMonitorThread.java:114)
    "ExecuteThread: '14' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x820420nid=0x1e5 waiting on monitor [0x12faf000..0x12fafdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '13' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x81f2d0nid=0x1e4 waiting on monitor [0x12f6f000..0x12f6fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '12' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x81fec0nid=0x1e3 waiting on monitor [0x12f2f000..0x12f2fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '11' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x81eac0nid=0x1e2 waiting on monitor [0x12eef000..0x12eefdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '10' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x81d6c0nid=0x1e1 waiting on monitor [0x12eaf000..0x12eafdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '9' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x81c2d0nid=0x1e0 waiting on monitor [0x12e6f000..0x12e6fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '8' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x81cec0nid=0x1df waiting on monitor [0x12e2f000..0x12e2fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '7' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x81bac0nid=0x1de waiting on monitor [0x12def000..0x12defdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '6' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x81a6c0nid=0x1dd waiting on monitor [0x12daf000..0x12dafdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '5' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x8192d0nid=0x1dc waiting on monitor [0x12d6f000..0x12d6fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '4' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x819ec0nid=0x1db waiting on monitor [0x12d2f000..0x12d2fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '3' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x818990nid=0x1da waiting on monitor [0x12cef000..0x12cefdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '2' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x817630nid=0x1d9 waiting on monitor [0x12caf000..0x12cafdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '1' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x816150nid=0x1d8 waiting on monitor [0x12c6f000..0x12c6fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '0' for queue: 'JmsDispatcher'" daemon prio=5 tid=0x816690nid=0x1d7 waiting on monitor [0x12c2f000..0x12c2fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '2' for queue: 'weblogic.transaction.AsyncQueue'" daemonprio=5 tid=0x811cc0 nid=0x1d6 waiting on monitor [0x12bef000..0x12befdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '1' for queue: 'weblogic.transaction.AsyncQueue'" daemonprio=5 tid=0x8104c0 nid=0x1d5 waiting on monitor [0x12baf000..0x12bafdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '0' for queue: 'weblogic.transaction.AsyncQueue'" daemonprio=5 tid=0x80f020 nid=0x1d4 waiting on monitor [0x12b6f000..0x12b6fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "Thread-4" prio=5 tid=0x80e440 nid=0x1d3 waiting on monitor [0x12b2f000..0x12b2fdc0]
         at java.lang.Object.wait(Native Method)
         at java.util.TimerThread.mainLoop(Timer.java:427)
         at java.util.TimerThread.run(Timer.java:380)
    "ExecuteThread: '1' for queue: 'DRS'" daemon prio=5 tid=0x80d700 nid=0x1d2waiting on monitor [0x12aef000..0x12aefdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '0' for queue: 'DRS'" daemon prio=5 tid=0x80b160 nid=0x1d1waiting on monitor [0x12aaf000..0x12aafdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '0' for queue: 'Multicast'" daemon prio=5 tid=0x80a8b0nid=0x1d0 waiting on monitor [0x12a6f000..0x12a6fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '1' for queue: 'Replication'" daemon prio=5 tid=0x8072f0nid=0x1cf waiting on monitor [0x12a2f000..0x12a2fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '0' for queue: 'Replication'" daemon prio=5 tid=0x807430nid=0x1c9 waiting on monitor [0x129ef000..0x129efdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "LDAPConnThread 10.1.7.26:7001" daemon prio=5 tid=0x7f56c0 nid=0x1cdrunnable [0x1296f000..0x1296fdc0]
         at java.net.SocketInputStream.socketRead(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:85)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:181)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:199)
         at netscape.ldap.ber.stream.BERElement.getElement(BERElement.java:101)
         at netscape.ldap.LDAPConnThread.run(LDAPConnThread.java:420)
    "LDAPConnThread 10.1.7.26:7001" daemon prio=5 tid=0x7f35c0 nid=0x1cbrunnable [0x128ef000..0x128efdc0]
         at java.net.SocketInputStream.socketRead(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:85)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:181)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:199)
         at netscape.ldap.ber.stream.BERElement.getElement(BERElement.java:101)
         at netscape.ldap.LDAPConnThread.run(LDAPConnThread.java:420)
    "LDAPConnThread 10.1.7.26:7001" daemon prio=5 tid=0x7edc70 nid=0x1carunnable [0x128af000..0x128afdc0]
         at java.net.SocketInputStream.socketRead(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:85)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:181)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:199)
         at netscape.ldap.ber.stream.BERElement.getElement(BERElement.java:101)
         at netscape.ldap.LDAPConnThread.run(LDAPConnThread.java:420)
    "VDE Transaction Processor Thread" prio=2 tid=0x7e21c0 nid=0x1c5 waitingon monitor [0x1282f000..0x1282fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at com.octetstring.vde.backend.standard.TransactionProcessor.waitChange(TransactionProcessor.java:306)
         at com.octetstring.vde.backend.standard.TransactionProcessor.run(TransactionProcessor.java:192)
    "ExecuteThread: '1' for queue: '__weblogic_admin_rmi_queue'" daemonprio=5 tid=0x7a7020 nid=0x1c4 waiting on monitor [0x127df000..0x127dfdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '0' for queue: '__weblogic_admin_rmi_queue'" daemonprio=5 tid=0x7d7750 nid=0x1c3 waiting on monitor [0x1279f000..0x1279fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'" daemonprio=5 tid=0x7c26b0 nid=0x1c2 waiting on monitor [0x1273f000..0x1273fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '0' for queue: '__weblogic_admin_html_queue'" daemonprio=5 tid=0x7c2bf0 nid=0x1c1 waiting on monitor [0x126ff000..0x126ffdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "TimeEventGenerator" daemon prio=5 tid=0x7c00d0 nid=0x1c0 waiting onmonitor [0x126bf000..0x126bfdc0]
         at java.lang.Object.wait(Native Method)
         at weblogic.time.common.internal.TimeTable.snooze(TimeTable.java:272)
         at weblogic.time.common.internal.TimeEventGenerator.run(TimeEventGenerator.java:139)
         at java.lang.Thread.run(Thread.java:479)
    "ExecuteThread: '1' for queue: '_weblogic_dgc_queue'" daemon prio=5tid=0x7bfac0 nid=0x1bf waiting on monitor [0x1267f000..0x1267fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '0' for queue: '_weblogic_dgc_queue'" daemon prio=5tid=0x7be5c0 nid=0x1be waiting on monitor [0x1263f000..0x1263fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "HighPriority TimeEventGenerator" daemon prio=9 tid=0x7bee10 nid=0x1bdwaiting on monitor [0x125ff000..0x125ffdc0]
         at java.lang.Object.wait(Native Method)
         at weblogic.time.common.internal.TimeTable.snooze(TimeTable.java:272)
         at weblogic.time.common.internal.TimeEventGenerator.run(TimeEventGenerator.java:139)
         at java.lang.Thread.run(Thread.java:479)
    "SpinnerRandomSource" daemon prio=5 tid=0x7bc270 nid=0x1bc waitingon monitor [0x125bf000..0x125bfdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.security.SpinnerRandomBitsSource.run(SpinnerRandomBitsSource.java:60)
         at java.lang.Thread.run(Thread.java:479)
    "ExecuteThread: '14' for queue: 'default'" daemon prio=5 tid=0x7b9050nid=0x1bb runnable [0x1257f000..0x1257fdc0]
         at weblogic.socket.NTSocketMuxer.getNextSocket(Native Method)
         at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:534)
         at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
    "ExecuteThread: '13' for queue: 'default'" daemon prio=5 tid=0x7b8050nid=0x1ba runnable [0x1253f000..0x1253fdc0]
         at weblogic.socket.NTSocketMuxer.getNextSocket(Native Method)
         at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:534)
         at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
    "ExecuteThread: '12' for queue: 'default'" daemon prio=5 tid=0x7b8840nid=0x1b9 runnable [0x124ff000..0x124ffdc0]
         at java.net.PlainDatagramSocketImpl.receive(Native Method)
         at java.net.DatagramSocket.receive(DatagramSocket.java:387)
         at weblogic.cluster.FragmentSocket.receive(FragmentSocket.java:158)
         at weblogic.cluster.MulticastManager.execute(MulticastManager.java:336)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
    "ExecuteThread: '11' for queue: 'default'" daemon prio=5 tid=0x7b7360nid=0x1b8 waiting on monitor [0x124bf000..0x124bfdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '10' for queue: 'default'" daemon prio=5 tid=0x7b7ec0nid=0x1b7 waiting on monitor [0x1247f000..0x1247fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '9' for queue: 'default'" daemon prio=5 tid=0x7b6ac0nid=0x1b6 waiting on monitor [0x1243f000..0x1243fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '8' for queue: 'default'" daemon prio=5 tid=0x7b56c0nid=0x1b5 waiting on monitor [0x123ff000..0x123ffdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '7' for queue: 'default'" daemon prio=5 tid=0x7b4360nid=0x1b4 waiting on monitor [0x123bf000..0x123bfdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
    "ExecuteThread: '6' for queue: 'default'" daemon prio=5 tid=0x7b4ec0nid=0x1b3 waiting on monitor [0x1237f000..0x1237fdc0]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:415)
         at weblogic.kernel.ExecuteThread.

  • Error acceessing remote EJB 2.0 from OSB

    Hi All,
    I am trying to access a remote EJB(2.0) from OSB. When i am trying to connect to the EJB i am getting this error.
    "java.net.ConnectException: Connection refused: connect; No available router to destination"
    I have built the WSDl based on the client jar that is provided and then configured the JNDI Provider. Then I provided the endpoint EJB URL in the following format.
    ejb:JNDIProviderName:ConnectionfactoryName:JNDIName.
    Let me know if i have missed out any configuration in order to access EJB. Your help is appreciated as we are struck in SIT.
    Thanks,
    B
    .

    Strange question. If you know EJB 2 and you know EJB 3, you should be able to answer this question yourself. If you don't know one of the two, you shouldn't be asking this question but hitting the books.
    As for the errors you are getting, the error couldn't be more clear:
    java.lang.NoClassDefFoundError: com/fammllc/exceptions/LubeNominationExceptionIt doesn't even have something to do with EJBs, its a simple case of class not found. The warning is more odd as the EJB 3 spec defines that transactions should default to REQUIRED, not "NOT_SUPPORTED". If EJB 3 would really be in play here, you wouldn't be getting this warning. Its probably a case of "read the manual" - the manual of whatever container you are using (I'm guessing Weblogic, which has its own forum here: https://forums.oracle.com/forums/category.jspa?categoryID=193).
    Edited by: gimbal2 on May 10, 2012 4:56 AM

  • Need a Help to Run the EJB client

    Hello Friends,
    I'm using EJB3.0. while running my client side bean I got a Exception like this " javax.naming.NameNotFoundException: maheshwaran.count not bound." I'm new to EJB so i couldn't find specifically what is the mistake in my files.
    I created the following files. It are listed below
    FileName: count.java
    "package maheshwaran;
    public interface count {
    public int count();
    public void set(int val);
    public void remove();
    FileName2 : countBean.java
    "package maheshwaran;
    import javax.ejb.*;
    import javax.interceptor.Interceptors;
    @Stateful
    @Remote(count.class)
    @Interceptors(countCallBacks.class)
    public class countBean implements count{
    private int val;
    public int count(){
    System.out.println("count()");
    return ++val;
    public void set(int val){
    this.val=val;
    System.out.println("set()");
    @Remove
    public void remove(){
    System.out.println("remove()");
    FileName3: countCallBacks.java
    " package maheshwaran;
    import javax.annotation.PostConstruct;
    import javax.annotation.PreDestroy;
    import javax.ejb.*;
    import javax.interceptor.InvocationContext;
    public class countCallBacks {
    @PostConstruct
    public void construct(InvocationContext ctx){
    System.out.println("cb:construct()");
    @PostActivate
    public void activate(InvocationContext ctx){
    System.out.println("cb:activate()");
    @PrePassivate
    public void passivate(InvocationContext ctx){
    System.out.println("cb:passivate()");
    @PreDestroy
    public void destroy(){
    System.out.println("cb:destroy()");
    The client side class is following: countClient.java
    "package maheshwaran;
    import javax.naming.*;
    public class countClient {
    public static final int noofClients=3;
    public static void main(String args[]){
    try{
    Context ctx=new InitialContext(System.getProperties());
    count count[]=new count[noofClients];
    int countval=0;
    System.out.println("Instatntiating Beans");
    for(int i=0;i<noofClients;i++){
    count=(count) ctx.lookup(count.class.getName());
    count.set(countval);
    countval=count.count();
    System.out.println(countval);
    Thread.sleep(100);
    System.out.println("Calling count on Beans");
    for(int i=0;i<noofClients;i++){
    countval=count.count();
    System.out.println(countval);
    count.remove();
    Thread.sleep(50);
    }catch(Exception e){e.printStackTrace();}
    The Deployment Descriptor file is following: ejb-jar.xml
    "><?xml version="1.0" encoding="UTF-8?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" version="3.0"
    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">
    <description>Stateful Session Bean Example</description>
    <display-name>Stateful Session Bean Example</display-name>
    <enterprise-beans>
    <session>
    <ejb-name>countBean</ejb-name>
    <business-remote>maheshwaran_dd.count</business-remote>
    </business-remote>
    <ejb-class>maheshwaran_dd.countBean</ejb-class>
    <session-type>Stateful</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    <interceptors>
    <interceptor>
    <interceptor-class>maheshwaran_dd.countCallBacks</interceptor-class>
    <post-construct>
    <lifecycle-callback-method>construct</lifecycle-clallback-method>
    </post-construct>
    <post-activate>
    <lifecycle-callback-method>activate</lifecycle-callback-method>
    </post-activate>
    <pre-passivate>
    <lifecycle-callback-method>passivate</lifecycle-callback-method>
    </pre-passivate>
    </interceptor>
    </interceptors>
    <assembly-descriptor>
    <interceptor-binding>
    <ejb-name>countBean</ejb-name>
    <interceptor-class>maheshwaran_dd.countCallBacks</interceptor-class>
    </interceptor-binding>
    </assembly-descriptor>
    </ejb-jar> "
    please help me to rectify this problem.
    Thanks & regards,
    Maheshwaran Devaraj

    Hi,
    user586 wrote:
    i want to write the query to select the coupon whose Expiry date in the table is NOT within 30 days.If you mean expirationdate (datatype: DATE) is not within 30 days (past or future) of run time, then:
    SELECT  coupon          -- or whatever columns you want
    FROM    table_x
    WHERE   expirationdate  NOT BETWEEN  SYSDATE - 30
                                AND      SYSDATE + 30
    ;

  • Ejb-client.jar

    Hi,
    I've got an EJB system that until now have been packaging as just a
    bean jar and not bothering with a ejb-client.jar. I now want to
    package as follows
    a). A bean EAR file (containing bean jar, and dependency jars) - for
    deploying on EJB server.
    b). An app EAR file (containing WAR, containing ejb-client.jar).
    The first part is done. The second raised questions about the contents
    of the ejb-client.jar. I have packaged the Home/Remote interfaces and
    all necessary utility classes (i.e omitting the Local/LocalHome/EJB
    classes). What I need to know is what goes in there in terms of
    descriptors.
    Do I just package the exact same ejb-jar.xml, jboss.xml,
    jbosscmp-jdbc.xml, weblogic-ejb-jar.xml, weblogic-cmp-rdbms-jar.xml ?
    or do I have to change these in some way ?
    Do I also add the ejb-client-jar tag to the ejb-jar.xml ? (would this
    also go in the ejb-jar.xml that goes in the bean jar ?) ... and indeed
    what would I put in there ... just the name of ejb-client-jar file
    even though its only being packaged into any application WAR (what
    purpose does it serve) ?
    TIA

    The ejb-link value should include pathnames relative to the top level of the EAR
    file.
    <ejb-link>../my_beans-client.jar#CurrencyExchange</ejb-link>
    Andy Jefferson <[email protected]> wrote:
    Deepak Vohra wrote:
    An ejb-client.jar contains the class files, the home and remote interfaces
    and the primary key class, a client program needs to call the EJBs
    contained in the ejb-jar file.
    Also, ejb-client.jar contains a copy of any classes from the ejb-jarfile
    that
    are referenced by the home and remote interfaces and the primary key
    class. Deployment descriptors are not required in the ejb-client.jar.
    ejb-client-jar element is not a required element in ejb-jar.xml. If
    ejb-client-jar.xml is specified in ejb-jar.xml ejbc generates the
    ejb-clent.jar file.
    Thx. I'm not interested in using any server-specific tools (like ejbc)
    since
    I'm deploying to multiple servers and so am generating the ejb-client
    jar
    myself in my build process. In this context, what purpose does the
    <ejb-client-jar> tag in the ejb-jar.xml descriptor have ? Why does the
    beans jar need to know anything about where the client stubs are ?
    As far as I can tell I'm including the right things in my ejb-client.jar,
    and I've tried deploying my web-app EAR to WebLogic 7.0 and I always
    get
    that it can't find the ejb-link elements. What i've got in my EAR is
    my_app.war
    META-INF/application.xml
    and in the WAR
    my JSP files
    WEB-INF/web.xml
    WEB-INF/jboss-web.xml
    lib/my_beans-client.jar
    In the WEB-INF I have ejb-ref's like the following
    <ejb-ref >
    <ejb-ref-name>ejb/CurrencyExchangeHome</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>my_domain.CurrencyExchangeHome</home>
    <remote>my_domain.CurrencyExchangeRemote</remote>
    <ejb-link>my_beans-client.jar#CurrencyExchange</ejb-link>
    </ejb-ref>
    Should I be putting the my_beans-client.jar in the EAR and not the WAR
    Seems I am missing something, but not sure what exactly.

  • Simplest way to restrict access to remote EJB calls

    I'm using weblogic 10.3 and I'm new to security in weblogic. I was looking at the documentation at http://docs.oracle.com/cd/E13222_01/wls/docs103/ConsoleHelp/taskhelp/security/ManageSecurityForDD.html
    but got a little overwhelmed by the many options on how to implement security. Plus, I am getting confused between JDNI security and EJB Layer security (they're not the same thing, right?)
    Can someone explain what the simplest way would be to prevent an "unauthorized" client to make remote EJB calls? For example, I know of the ConnectionFilters that you can implement, which can prevent remote callers from making T3 or IIOP calls if they're not from an authorized IP, etc. This is a good start but ideally I would want to password protect the EJBs, and any EJB client would have to provide this username/password somehow. Or possibly use two-way SSL for t3? The client app would have to provide a certificate to prove that it's trusted.
    To be clear, I don't think I need weblogic to handle any fine-grained access control. I just want to make sure that the client (e.g., a webapp) is a trusted one. Once the EJB container is satisfied that the client is trusted (preferably by user/pass) then the client is free to execute any EJB methods.
    Thanks in advance.
    Edited by: user10123426 on Mar 14, 2012 10:26 AM

    I'm don't think you can do a posture check by MAC address.  If you're using SSLVPN, and you're running Windows,  you can do a Host Scan check for the following registry key:
    HKLM\System\CurrentControlSet\Services\Tcpip\Parameters\Domain
    Then set up a Pre-Login policy that goes Windows->Registry Check->Success->RegCheckOK
                                                                                                         |->Fail->RegCheckFail
    At this point you've just verified that you can read that key and the value is stored for later use.  You're not making an allow/deny decision yet. 
    Then in your Dynamic Access policy you do a Policy check for Location=RegCheckFail, that says "Unable to read registry".  The following DAP policy check looks for Location=RegCheckOK, and validates that the value is your AD domain. 
    Alternatively, you could put a NAC box (ISE or Clean Access) 'behind/after' the VPN box, so although anyone can connect only domain machines (and/or whatever other posture checks you want to make, e.g. Antivirus status) make it through to the rest of the network.

Maybe you are looking for