Rich Domain Model and Local JNDI Lookups

Hi,
I'm sure this is a problem a lot of other people have come across but there seems to be very little coherent discussion on the issue, so I'd very much appreciate any views people might have on the matter.
The problem is whether or not you compromise your object-oriented principles and stick with the field or method level EJB dependency injection annotations, a procedural programming style, and a weak domain-model; or, strive for a richer domain model with a sub-optimal JDNI lookup solution.
Take adding an item to simple shopping cart as an example.
@Stateful
public class CartBean implements Cart {
  @EJB
  private ProductManagerLocal productManager;
  @EJB
  private PricingServiceLocal pricingService;
  private Order order;
  public void addItem(final int productId) {
    if (order.containsLineItem(productId) {
      order.addQuantity(productId, 1);
    } else {
      final Product product = productManager.getProduct(productId);
      final Price price = pricingService.getPrice(productId);
      order.createLineItem(product, price);
}The code above makes Cart dependent on Product and Price, when in reality Cart only cares about Order. The logic in the addItem() method should really be in the Order object on the basis Order is the information expert, but because Order is a POJO you can't inject the necessary EJB references. What's more, because the EJB interfaces are local they don't have a JNDI name assigned in the same way a remote one would.
To perform a portable lookup of the required EJBs from within an instance of the Order class, the method must be invoked by a component with the required EJB references in its private namespace. See https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#POJOLocalEJB. This makes for a very brittle solution with no compile time checks whatsoever.
The problem seems to have been addressed in EJB 3.1 as the proposal for portable global JNDI names also applies to session beans exposing local only interfaces. See http://blogs.sun.com/kensaks/entry/portable_global_jndi_names.
There seems to be very little guidance from Sun on this matter; ALL the examples in the JEE 5 Tutorial follow the anaemic domain model approach with business objects presented as little more than dumb placeholders for persistent data.
What are people's thoughts on this? When it comes to EJB do we simply have to accept that local service lookups from POJOs aren't that robust and go with a procedural programming style, or should we be implementing a local service locator to facilitate domain objects taking on appropriate responsibilities via access to local stateless session beans / services?

Hi,
I'm sure this is a problem a lot of other people have come across but there seems to be very little coherent discussion on the issue, so I'd very much appreciate any views people might have on the matter.
The problem is whether or not you compromise your object-oriented principles and stick with the field or method level EJB dependency injection annotations, a procedural programming style, and a weak domain-model; or, strive for a richer domain model with a sub-optimal JDNI lookup solution.
Take adding an item to simple shopping cart as an example.
@Stateful
public class CartBean implements Cart {
  @EJB
  private ProductManagerLocal productManager;
  @EJB
  private PricingServiceLocal pricingService;
  private Order order;
  public void addItem(final int productId) {
    if (order.containsLineItem(productId) {
      order.addQuantity(productId, 1);
    } else {
      final Product product = productManager.getProduct(productId);
      final Price price = pricingService.getPrice(productId);
      order.createLineItem(product, price);
}The code above makes Cart dependent on Product and Price, when in reality Cart only cares about Order. The logic in the addItem() method should really be in the Order object on the basis Order is the information expert, but because Order is a POJO you can't inject the necessary EJB references. What's more, because the EJB interfaces are local they don't have a JNDI name assigned in the same way a remote one would.
To perform a portable lookup of the required EJBs from within an instance of the Order class, the method must be invoked by a component with the required EJB references in its private namespace. See https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#POJOLocalEJB. This makes for a very brittle solution with no compile time checks whatsoever.
The problem seems to have been addressed in EJB 3.1 as the proposal for portable global JNDI names also applies to session beans exposing local only interfaces. See http://blogs.sun.com/kensaks/entry/portable_global_jndi_names.
There seems to be very little guidance from Sun on this matter; ALL the examples in the JEE 5 Tutorial follow the anaemic domain model approach with business objects presented as little more than dumb placeholders for persistent data.
What are people's thoughts on this? When it comes to EJB do we simply have to accept that local service lookups from POJOs aren't that robust and go with a procedural programming style, or should we be implementing a local service locator to facilitate domain objects taking on appropriate responsibilities via access to local stateless session beans / services?

Similar Messages

  • Local jndi lookup - present in 1 appln, lookup in 2nd appln (same server)

    Hi,
    I have deployed 2 applications ( A.ear, B.ear ) on the same server.
    There is ejb( has only local interface no remote interface ) which is present in A.ear.
    Now I want to do a local jndi lookup of the ejb in 2nd application (B.ear )
    Can we do this in weblogic ? Any ideas
    I have an annotation like this in the ejb :
    @Stateless(name = "DisConfigManager", mappedName = "DisConfigManagerImpl")
    @Local
    Regards,
    Harsha

    Harsha,
    I'm not very knowledgeable on granular details of the EJB specification, but I don't think local ejbs are accessible to other applications.
    Consider this snippet from this old OReilly link:
    http://onjava.com/pub/a/onjava/2004/11/03/localremote.html
    Before you start running to implement local client view into your application, you need to be aware of some restrictions. Local client view can only be accessed:
    When enterprise beans are packaged within the same EJB-JAR package.
    When enterprise beans are packaged within different EJB-JAR packages, but everything is still packaged within the same application's EAR package.
    When a web component in a WAR file is packaged within the same application's EAR package.
    Local client view cannot be accessed:
    When an EJB or web component is packaged in a different application's EAR packages.
    When a web component is deployed in a web container, and EJBs are deployed in an EJB container, and these containers are separated (even if they are running on the same machine).

  • Cost of a local JNDI lookup

    5.1sp8
    I always thought that cost of a local JNDI lookup is pretty
    small, but just found that it is not:
    application JSP's extend common superclass which does(did!) JNDI
    lookup based on the URI and sets a threadlocal variable before
    invoking jspservice() method.
    During performance testing replacing JNDI with a static hashtable
    improved thoughput by ~25-30% (pages themselves are very fast -
    mostly jsp cache tags hits).
    Weird.
    Dimitri

    First of all I am not caching the Initial Context. I am caching the results
    of the initial context lookup into a hashmap (I have changed this from
    hashtable, which I proposed originally in my posting - see my latest post).
    Second, if you have client running in seperate JVM, can not lookup the
    hashmap created by the server.
    Third, on the server side, you cannot get a reference of a startup class.
    The server simply instantiates the class and invoke startup() method (from
    T3StartupDef interface) and it does not keep reference after startup()
    method returns. But you could use another class that you want to get an
    instance of by creating it within the startup class and provide a static
    method to create/return that instance. I guess the proper way of saying it
    would be create the hashmap as a class variable in a singleton class
    (hopefully you get the idea)...
    .raja
    -----Original Message-----
    From: Mittal, Raj [mailto:[email protected]]
    Sent: Wednesday, June 20, 2001 1:16 PM
    To: '[email protected]'
    Subject: Re: cost of a local JNDI lookup
    Raja,
    We are also wrapping all the JNDI requirements in a startup class and WL
    loads it automatically. Now my problem is how to access the InitalContext
    (initialized by startup class) by a client and also on the server side. If
    you have any code that explains that, please pass it along.
    Thanks
    Raj Mittal
    Front Office Group
    NEUBERGER BERMAN
    *(646) 497-4224
    "Raja Mukherjee" <[email protected]> wrote in message
    news:[email protected]...
    Mike,
    Thanks for the reply to the previous message. For the particularbenchmark,
    I knew all the JNDI lookup requirements at the design time (I think that
    would be the case in most applications), so I wrapped them into a startup
    class.
    .raja
    "mike " <[email protected]> wrote in message
    news:[email protected]...
    In the code where you need the context ...
    static Hashtable h=new Hashtable();
    ctx=h.get(ctx_name);
    if(ctx == null){
    ctx=new InitialContext(... args ...);
    h.put(ctx_name, ctx);
    mike
    Kirk Everett <[email protected]> wrote:
    Can you explan what you mean by "use a static hash table"? We did some
    load
    testing on 6.0 SP 1 and saw that
    creating an local initial context is fairly costly and I would like to
    understand your solution. Thanks.
    Kirk
    Raja Mukherjee wrote:
    Dimitri,
    I was surprised to see that in WLS 5.1. I have seen this on 6.0 and
    understood that JNDI lookups need to be sereilized because of the newclass
    loader. In the recent benchmark, for 6.0 we found that the about
    15-20%
    of
    the (client's) application CPU time was spent on JNDI lookup
    (serealization). We changed it to a static hash table.
    Unfortunately, I am only seeing marginal gain in 5.1sp8.
    For all 6.0 applications we are going to use static hashtable. Mightas well
    do it now for 5.1 so that your migration to 6.0 will be easier :).
    .raja
    "Daniel Hoppe" <[email protected]> wrote in message
    news:[email protected]...
    This is irritating. If I remember correctly, until now the official
    statement was that it's not even worth caching an InitialContext ifit's
    a local one. Guess I'll have to review my application for this as
    well.
    >>>>
    Daniel
    -----Ursprüngliche Nachricht-----
    Von: Dimitri Rakitine [mailto:[email protected]]
    Bereitgestellt: Freitag, 15. Juni 2001 05:17
    Bereitgestellt in: performance
    Unterhaltung: cost of a local JNDI lookup
    Betreff: cost of a local JNDI lookup
    5.1sp8
    I always thought that cost of a local JNDI lookup is pretty
    small, but just found that it is not:
    application JSP's extend common superclass which does(did!) JNDI
    lookup based on the URI and sets a threadlocal variable before
    invoking jspservice() method.
    During performance testing replacing JNDI with a static hashtable
    improved thoughput by ~25-30% (pages themselves are very fast -
    mostly jsp cache tags hits).
    Weird.
    Dimitri

  • Could take the same JNDI-names for both tags: jndi-name and local-jndi-name

    Hello!
    I try to design the weblogic-ejb-jar.xml descriptor and I ask myself, if I could
    take the same JNDI-names for both tags:
    <jndi-name> and <local-jndi-name> ?
    Could you give me and advice if this is ok?
    Thanks

    if you have two separate interfaces, you cant bind them to the same jndi
    name. you will have a local home that extends EJBLocalHome and a remote
    home called EJBHome. also you need to know which one you are looking up
    so you can cast it properly, and use it property (remote interfaces need
    PortableRemoteObject, remote parameters are passed by value, ...)
    joern kirch wrote:
    Hello!
    I try to design the weblogic-ejb-jar.xml descriptor and I ask myself, if I could
    take the same JNDI-names for both tags:
    <jndi-name> and <local-jndi-name> ?
    Could you give me and advice if this is ok?
    Thanks

  • Difference between AD domain user and local user

    Hello, I think the title is self explanatory. I am trying to figure out difference between AD domain user and local user. SAP Help wasnt very helpful.
    Thanks.

    Hi,
    It's about where the user accounts are kept. Domain users are users that are entered into the domain users group on a domain controller. These domain users can be centrally managed at the server. Whereas the local users are the users created in the local system.
    In BPC, you can select users from either of them or in combination as well. However, If you want to make change in the local user credentials, you need to login to the system in which the user has been created and make the changes there. On the other hand, changes to domain users can be made from any domain connected machine with the right software and the necessary rights. The changes only need to be made once.
    Hope this helps.

  • Domain users and local users can't login to reporting service web environment

    Hello,
    We installed reporting services at one of our customers but aren't able to use domain users to login. We've tried to login with a domain user, a local user but both aren't working. We set the proper permissions for the users on the reports folders.
    We can only login with the buildin/administrator account on the local url: http://servername/reports
    How can we allow login with domain users on other report manager url's?

    Below link may be helpful,
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/623da309-21fa-42a8-905f-1424144a347d/setting-up-a-user-in-ssrs?forum=sqlreportingservices
    Regards, RSingh

  • EJBContainer (glassfish v 3.0 impl) and JUnit, jndi lookup is impossible!!!

    Hello,
    i hope to find a solution, but i think there's something wrong:
    i did my JUnit test case and i instantiate the glassfish v3 EJBContainer in my @BeforeClass method
    running the test, deploy messages are something like this:
    INFO: Portable JNDI names for EJB PhaseHandler : [java:global/ejb-app4338883541443661181/classes/MyEJB!my.package.MyEJB, java:global/ejb-app4338883541443661181/classes/MyEJB]i would like to lookup for the ejb in my @Before methods... but... which jndi name should i use to fetch the EJB if the app name is random?
    i've tried some tries:
    java:global/classes/MyEJB (read from a tutorial)
    java:app/classes/MyEJB (thought it could work but.. no it doesn't)
    java:module/MyEJB (failed :/ )
    any suggestion? any help will be greatly appreciated
    follows my maven dependency configuration
        <repositories>
            <repository>
                <id>maven2-repository.dev.java.net</id>
                <name>Java.net Repository for Maven</name>
                <url>http://download.java.net/maven/glassfish</url>
                <layout>default</layout>
            </repository>
        </repositories>
        <dependencies>
            <dependency>
                <groupId>org.glassfish.extras</groupId>
                <artifactId>glassfish-embedded-all</artifactId>
                <version>3.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>javax</groupId>
                <artifactId>javaee-api</artifactId>
                <version>6.0</version>
                <type>jar</type>
                <scope>provided</scope>
            </dependency>
        </dependencies>and this is my test case:
        @BeforeClass
        public static void startContainer() {
            container = EJBContainer.createEJBContainer();
        @AfterClass
        public static void stopContainer() {
            if (container != null) {
                container.close();
         * @throws NamingException
        @Before
        public void setup() throws NamingException {
            myEjb =(MyEJB)container.getContext().lookup(
                    "which jndi should i use?");
        }

    i did my JUnit test case and i instantiate the glassfish v3 EJBContainer in my @BeforeClass methodWhat is "your jUnit test case"?
    You don't have to implement jUnit tests, and if you do, you generally benefit to have more than one.
    Moreover, you shouldn't think it as "doing jUnit test cases", but merely as "doing unit-testing using jUnit"

  • Resolving local domain name and nameserver address

    Hi,
    Is there any way to get the local domain name (on Windows it would be NT domain name and on Unix based platform it is DNS server's domain name) and local DNS server address ?
    Thanks,
    Rohit

    import java.net.*;
    try
       InetAddress ip = InetAddress.getLocalHost();
       String fqdn = InetAddress.getCanonicalHostName();
       int firstDot = fqdn.indexOf(".");
       String domain = fqdn.substring(firstDot+1);
       System.out.println("domain: "+domain);
    catch(Exception ex)
       ex.printStackTrace();
    }

  • NamingException on EJB jndi lookup

    I have two applications - deployed under the "default instance".
    When I start up OC4J and deloy app1 and app2, then app1 can do a JNDI lookup on a session bean that resides in App2. It uses the RMIInitialContextFactory.
    Provider is "ormi://localhost/app2"
    My problem is that if I undeploy and redeploy app2, then app1 suddenly can't do a lookup to any sessionBean found in app2 anymore, even though the jndi name still shows up in the browser, and if I try to look it up from an external application running outside of oc4j (with exactly the same code as I'm using in app1), it also works.
    So why is app1 not able to find app2 via jndi after a redeployment?
    D

    Avi - thank you for your response.
    First of all, I run on Suse Linux 10.1. Dunno if that's any help, but hey, more info can't help :)
    Let's answer your questions:
    1.) OCJ4 Version: 10.1.3.0.0 (build 060119.1546.05277)
    2.) JDK Version: 1.5.0_07-b03
    As for your suggestions:
    1.) app1 = parent of app2.
    I'm rather new to Oracle, so maybe I made a mistake during my investigations. Still, I'd like to give a breakdown: I built a framework-type application, and thought about deploying "child modules" (plug-in applications) underneath it, as you proposed.
    This worked fine, but there comes a problem whenever you try to use something like Hibernate in any application that's not deployed in the root (ie any app that's deployed as a child of another). The problem came in 2 flavours:
    A) If you use a jar in the parent and try to do resource loading from the child, the context of the parent is used the whole time. Since the search-policy of the class-loader is loaded->parent->shared->local, and if Hibernate is already used in the parent, it never gets to the child and thus trying to load a resource in the child is futile since parent can't see child context.
    B) Lets say you're not using Hibernate at all in the parent application. When doing resource loading (eg the hibernate.cfg.xml file), Hibernate tries to locate the resource via Thread.currentThread().getContextClassLoader(). OC4J returns the parent-app's thread as the currentThread, NOT that of the child-application that you're actually running the code from, thus it will never be able to pick up resources from within a jar part of the child application. The only way that I managed to get it to work, was to include the Hibernate3.jar as part of the EAR deployment (ie listed it as <library path...> in the orion-application.xml. Putting it in shared-libs or app-libs didn't work...ever. Also, if I happened to use Hibernate in the parent-application, it doesn't matter if I put hibernate3.jar in the EAR of the child - the parent-version gets picked up and used due to the search-policy... NOTE: This is in a JAR - I'm not using WAR's so cannot force local loading as is possible with web-apps...
    I then opted to deploy applications seperately under the root, and using RMI to communicate from the framework-application to its "modules", and vice-versa. The master doesn't know the exact type of the remote interface of whatever child-module it needs to call, so it uses reflection to call the "create" on the EJBHome of whatever child-module it needs to invoke as well as the method on the actual remote-interface.
    Please note, if I deploy both applications (master and child), and perform JNDI lookups from master to child, it works perfectly. As soon as I do a redeploy (or explicity undeploy, deploy), JNDI fails. External clients, though, works all the time. Also, if I redeploy the child before ever calling it from the parent-application, it also works after I did redeployment. It's as if, when you do a JNDI lookup the first time, it caches something and from there on it breaks if you do a redeploy and perform a consequent app-to-app JNDI lookup...
    2.) dedicated.rmicontext=true
    I tried this by setting it as a JNDI property before getting the InitialContext - makes no difference, unfortunately.
    //========CODE============================
    // This is in a SessionBean inside the Master Application. For the time being I've hard-coded the provider-url of the client-application.
    // NOTE: This EXACT same code is used in the external java client - there it works perfect every time, whether I redeploy or not.
    //========================================
    Hashtable<String, String> env = new Hashtable<String, String>();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.PROVIDER_URL, "ormi://localhost/client-application");
    env.put(Context.SECURITY_PRINCIPAL, "oc4jadmin");
    env.put(Context.SECURITY_CREDENTIALS, "MyPassword");
    env.put("dedicated.rmicontext","true");
    InitialContext ctx = null;
    try {
         ctx = new InitialContext(env);
         // WHEN I REDEPLOY, CODE CRASHES ON THE NEXT LINE
         Object home = ctx.lookup("ejb/TestWorkerAProxyBean");
         EJBHome obHome = (EJBHome) PortableRemoteObject.narrow(home, EJBHome.class);
         System.out.println("EJBHOME Is [" + obHome + "]");
         final Object invocationTarget = MethodUtils.invokeExactMethod(obHome,"create",new Object[0]);
         System.out.println("invocation target = [" + invocationTarget + "]");
         ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
         IWorkerProxy proxy = (IWorkerProxy)Proxy.newProxyInstance(classLoader, new Class[]{IWorkerProxy.class}, new InvocationHandler() {
              public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
                   try {
                        Method remoteEjbMethod = invocationTarget.getClass().getMethod(method.getName(),method.getParameterTypes());
                        return remoteEjbMethod.invoke(invocationTarget, args);
                   } catch (Exception e) {
                        ExceptionHandler.handle(e);
                   return null;
    } catch (NamingException ne) {
         System.out.println("NamingException");
         ne.printStackTrace();
    } catch (NoSuchMethodException e) {
         System.out.println("NoSuchMethodException");
         e.printStackTrace();
    } catch (Exception e) {
         System.out.println("Other Exception");
         e.printStackTrace();
    ==========================
    ===========EXCEPTION (ONLY IF I REDEPLOY - IT WORKS PERFECT IF I RUN IT FIRST TIME)=================
    ==========================
    06/09/25 17:15:51 NamingException
    06/09/25 17:15:51 javax.naming.NameNotFoundException: ejb/TestWorkerAProxyBean not found
    06/09/25 17:15:51 at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:51)
    06/09/25 17:15:51 at javax.naming.InitialContext.lookup(InitialContext.java:351)
    06/09/25 17:15:51 at com.myapp.master.RequestProcessorBean.processRequest(RequestProcessorBean.java:140)
    06/09/25 17:15:51 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    06/09/25 17:15:51 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    06/09/25 17:15:51 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    06/09/25 17:15:51 at java.lang.reflect.Method.invoke(Method.java:585)
    06/09/25 17:15:51 at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    06/09/25 17:15:51 at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
    06/09/25 17:15:51 at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    06/09/25 17:15:51 at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
    06/09/25 17:15:51 at com.evermind.server.ejb.interceptor.system.TxSupportsInterceptor.invoke(TxSupportsInterceptor.java:37)
    06/09/25 17:15:51 at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
    06/09/25 17:15:51 at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    06/09/25 17:15:51 at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
    06/09/25 17:15:51 at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:86)
    06/09/25 17:15:51 at RequestProcessorLocal_StatelessSessionBeanWrapper4.processRequest(RequestProcessorLocal_StatelessSessionBeanWrapper4.java:37)
    06/09/25 17:15:51 at com.myapp.master.gateway.FrameworkGatewayBean.processObjectRequest(FrameworkGatewayBean.java:172)
    06/09/25 17:15:51 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    06/09/25 17:15:51 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    06/09/25 17:15:51 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    06/09/25 17:15:51 at java.lang.reflect.Method.invoke(Method.java:585)
    06/09/25 17:15:51 at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    06/09/25 17:15:51 at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
    06/09/25 17:15:51 at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    06/09/25 17:15:51 at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
    06/09/25 17:15:51 at com.evermind.server.ejb.interceptor.system.TxSupportsInterceptor.invoke(TxSupportsInterceptor.java:37)
    06/09/25 17:15:51 at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
    06/09/25 17:15:51 at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    06/09/25 17:15:51 at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
    06/09/25 17:15:51 at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:86)
    06/09/25 17:15:51 at FrameworkGatewayRemote_StatelessSessionBeanWrapper10.processObjectRequest(FrameworkGatewayRemote_StatelessSessionBeanWrapper10.java:94)
    06/09/25 17:15:51 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    06/09/25 17:15:51 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    06/09/25 17:15:51 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    06/09/25 17:15:51 at java.lang.reflect.Method.invoke(Method.java:585)
    06/09/25 17:15:51 at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
    06/09/25 17:15:51 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    06/09/25 17:15:51 at java.lang.Thread.run(Thread.java:595)

  • Error when implementing JPA domain model in separate JAR module

    Hi,
    I'm using JPA/TopLink Essentials to implement my domain model and services. From an architectural viewpoint I want to implement this as seperate Java project, while my View/Controller is implemented in another Java project. This last project has a dependency on the Model project. Deployment on an OC4J 10.1.3 is ok, but when I use a JSP, I get the following error. (Note that directly implementing my JPA classes in the View/Controller project does not give any errors.)
    Thanx, Ronald
    java.lang.NullPointerException     at oracle.toplink.essentials.ejb.cmp3.persistence.ArchiveFactoryImpl.createArchive(ArchiveFactoryImpl.java:64)     at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.findPersistenceArchives(PersistenceUnitProcessor.java:227)     at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.findPersistenceArchives(PersistenceUnitProcessor.java:210)     at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:239)     at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initializeFromMain(JavaSECMPInitializer.java:278)     at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.getJavaSECMPInitializer(JavaSECMPInitializer.java:81)     at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:119)     at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)     at com.trfsol.model.JPAResourceBean.getEMF(JPAResourceBean.java:23)     at com.trfsol.model.Service.getEmp(Service.java:28)     at com.trfsol.JPAServlet.doGet(JPAServlet.java:24)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)     at java.lang.Thread.run(Thread.java:595)

    Servlet class:
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              Collection<Emp> emps = new Service().getEmp();
              for (Emp emp : emps) {
                   System.out.println("Emp " + emp.getEname());
    In which the Service class comes from the Model project.
    Service class:
    public EntityManagerFactory getEMF () {
    if (emf == null) {
    emf = Persistence.createEntityManagerFactory("default", new java.util.HashMap());
    return emf;
    public Collection<Emp> getEmp(){
    EntityManagerFactory emf = getE
    EntityManager em = emf.createEntityManager();
    try{
    Collection<Emp> result = em.createNamedQuery("findAllEmps").getResultList();
    return result;
    finally{
    em.close();
    Persistence.xml (in the META-INF dir of the Model project)
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence persistence_1_0.xsd" version="1.0">
    <persistence-unit name="default" transaction-type="RESOURCE_LOCAL">
    <provider>
    oracle.toplink.essentials.PersistenceProvider
    </provider>
    <class>com.trfsol.Dept</class>
    <class>com.trfsol.Emp</class>
    <properties>
    <property name="toplink.logging.level" value="FINE"/>
    <property name="toplink.jdbc.driver" value="oracle.jdbc.OracleDriver"/>
    <property name="toplink.jdbc.url" value="jdbc:oracle:thin:@localhost:1521:ORCL"/>
    <property name="toplink.jdbc.password" value="tiger"/>
    <property name="toplink.jdbc.user" value="scott"/>
    </properties>
    </persistence-unit>
    </persistence>
    Regards, Ronald

  • PetStore doc, domain model, design decisions, etc

    Hello,
    I've downloaded the PetStore from http://java.sun.com/developer/releases/petstore/ . I installed it and it was ok.
    As it is an example project, I would like to get detailed documentation about this. I mean if a project like this starts what kind of decisions we have, what is the domain model look like, why?, etc.. So a complate description of the project.
    I have checked the web with google but I have not find anything related to this. Would you help me, please?

    Any one know where we can get Business Model, Domain Model and Object Model for Pet store app?
    Thanks.

  • JNDI lookup Issue

    All,
    I have this question in my head about JNDI lookups, but haven't received proper
    information when i do research. The question is simple.
    The setup is simple as well. Suppose that we have a typical WLS cluster setup,
    with
    WLS running in a JVM on a server host somewhere, with objects bound to its
    JNDI tree, and we also have a WLS client Java application. The client connects
    to WLS
    and performs JNDI lookups on the server.
    The question is, if the client uses JNDI to lookup an object that exists in a
    separate JVM, it does load balancing and failover properly. Alternatively, if
    client uses same JVM to lookup an object in failover case, we are encountering
    application specific error. I just need to know what makes difference when you
    lookup an object(RMI) from same JVM and separate JVM.
    Any and all help appreciated,
    -Senthil

    No one?

  • Error during JNDI lookup Accessing Remote EJB (access to web service restricted using declarative security model)

    Hello everyone,
    I developed a Web Service prototype accessing remote EJB using the EJB
    control with special syntax in the jndi-name attribute: @jws:ejb
    home-jndi-name="t3://10.10.245.70:7131/AccountDelegatorEJB"
    Everything works fine, but I get an error when I restrict access to my web
    service with a declarative security model by implementing steps provided in
    help doc:
    - Define the web resource you wish to protect
    - Define which security role is required to access the web resource
    - Define which users are granted the required security role
    - Configure WebLogic Server security for my web service(Compatibility
    Security/Users)
    I launch the service by entering the address in a web browser. When prompted
    to accept the digital certificate, click Yes, when prompted for network
    authentication information, enter username and password, navigate to the
    Test Form tab of Test View, invoke the method by clicking the button and I
    get the following exception:
    <error>
    <faultcode>JWSError</faultcode>
    <faultstring>Error during JNDI lookup from
    jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookup failed for
    name:t3://10.10.245.70:7131/AccountDelegatorEJB]</faultstring>
    <detail>
    <jwErrorDetail> weblogic.jws.control.ControlException: Error during JNDI
    lookup from jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookup failed
    for name:t3://10.10.245.70:7131/AccountDelegatorEJB] at
    weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
    8) at
    weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
    .java:220) at
    weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260) at
    ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
    ibas.GetSecure.retrieveVisaHistoryTxn(GetSecure.jws:64) </jwErrorDetail>
    </detail>
    </error>
    I have a simple Hello method as well in my WebService (which is also
    restricted) and it works fine, but remote EJB access doesn't. I tested my
    prototype on Weblogic 7.2 and 8.1 platforms - same result.
    Is that a bug or I am missing some additional configuration in order to get
    that working. Has anyone seen similar behavior? Is there a known resolution?
    Or a suggested way to work around the problem?
    Thank you.
    Andre

    Andre,
    It would be best if this issue is handled as an Eval Support case. Please
    BEA Customer Support at http://support.beasys.com along with the required
    files, and request that an Eval support case be created for this issue.
    Thanks
    Raj Alagumalai
    WebLogic Workshop Support
    "Andre Shergin" <[email protected]> wrote in message
    news:[email protected]...
    Anurag,
    I removed "t3", still get an error but a different one (Unable to create
    InitialContext:null):
    <error>
    <faultcode>JWSError</faultcode>
    <faultstring>Error during JNDI lookup from
    jndi://secuser1:[email protected]:7131/AccountDelegatorEJB[Unable to
    create InitialContext:null]</faultstring>
    <detail>
    <jwErrorDetail> weblogic.jws.control.ControlException: Error during JNDI
    lookup from
    jndi://secuser1:[email protected]:7131/AccountDelegatorEJB[Unable to
    create InitialContext:null] at
    weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
    8) at
    weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
    .java:220) at
    weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260) at
    ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
    ibas.GetVisaHistoryTransactions.getVisaHistoryTxn(GetVisaHistoryTransactions
    .jws:67) </jwErrorDetail>
    </detail>
    </error>
    Note: inter-domain communication is configured properly. The Web Service to
    remote EJB works fine without a declarative security.
    Any other ideas?
    Thank you for your help.
    Andre
    "Anurag" <[email protected]> wrote in message
    news:[email protected]...
    Andre,
    It seems you are using the URL
    jndi:t3://secuser1:[email protected]:7131/AccountDelegatorEJB
    whereas you should not be specifying the "t3:" protocol.
    The URL should be like
    jndi://secuser1:[email protected]:7131/AccountDelegatorEJB
    Please do let me know if you see any issues with this.
    Note that this will only allow you to access remote EJBs in the same WLS
    domain. For accessing EJBs on another domain, you need to configure
    inter-domain communication by
    following a few simple steps as mentioned at
    http://e-docs.bea.com/wls/docs81/ConsoleHelp/jta.html#1106135. This link has
    been provided in the EJB Control Workshop documentation.
    Regards,
    Anurag
    "Andre Shergin" <[email protected]> wrote in message
    news:[email protected]...
    Raj,
    I tried that before, it didn't help. I got similar error message:
    <error>
    <faultcode>JWSError</faultcode>
    <faultstring>Error during JNDI lookup from
    jndi:t3://secuser1:[email protected]:7131/AccountDelegatorEJB[Lookup
    failed for
    name:t3://secuser1:[email protected]:7131/AccountDelegatorEJB]</faultstr
    ing>
    <detail>
    <jwErrorDetail> weblogic.jws.control.ControlException: Error during JNDI
    lookup from
    jndi:t3://secuser1:[email protected]:7131/AccountDelegatorEJB[Lookup
    failed for
    name:t3://secuser1:[email protected]:7131/AccountDelegatorEJB] at
    weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
    8) at
    weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
    .java:220) at
    weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260) at
    ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
    ibas.GetSecure.retrieveVisaHistoryTxn(GetSecure.jws:64) </jwErrorDetail>
    </detail>
    </error>
    Anything else should I try?
    P.S. AccountDelegatorEJB, the remote EJB my Web Service calls is NOTaccess
    restricted.
    I hope there is a solution.
    Thanks,
    Andre
    "Raj Alagumalai" <[email protected]> wrote in message
    news:[email protected]...
    Andre,
    Can you try using the following url with username and password
    jndi://username:password@host:7001/my.resource.jndi.object ?
    once you add webapp level security, the authenticated is the user who
    invokes the EJB.
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/ejb/con
    CreatingANewEJBControl.html?skipReload=true
    has more info on using remote EJB's.
    Hope this helps.
    Thanks
    Raj Alagumalai
    WebLogic Workshop Support
    "Alla Resnik" <[email protected]> wrote in message
    news:[email protected]...
    Hello everyone,
    I developed a Web Service prototype accessing remote EJB using the EJB
    control with special syntax in the jndi-name attribute: @jws:ejb
    home-jndi-name="t3://10.10.245.70:7131/AccountDelegatorEJB"
    Everything works fine, but I get an error when I restrict access to my
    web
    service with a declarative security model by implementing steps
    provided
    in
    help doc:
    - Define the web resource you wish to protect
    - Define which security role is required to access the web resource
    - Define which users are granted the required security role
    - Configure WebLogic Server security for my web service(Compatibility
    Security/Users)
    I launch the service by entering the address in a web browser. Whenprompted
    to accept the digital certificate, click Yes, when prompted for
    network
    authentication information, enter username and password, navigate tothe
    Test Form tab of Test View, invoke the method by clicking the buttonand
    I
    get the following exception:
    <error>
    <faultcode>JWSError</faultcode>
    <faultstring>Error during JNDI lookup from
    jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookup failed for
    name:t3://10.10.245.70:7131/AccountDelegatorEJB]</faultstring>
    <detail>
    <jwErrorDetail> weblogic.jws.control.ControlException: Error during
    JNDI
    lookup from jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookupfailed
    for name:t3://10.10.245.70:7131/AccountDelegatorEJB] at
    weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
    8) at
    weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
    .java:220) at
    weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260)at
    ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
    ibas.GetSecure.retrieveVisaHistoryTxn(GetSecure.jws:64)</jwErrorDetail>
    </detail>
    </error>
    I have a simple Hello method as well in my WebService (which is also
    restricted) and it works fine, but remote EJB access doesn't. I testedmy
    prototype on Weblogic 7.2 and 8.1 platforms - same result.
    Is that a bug or I am missing some additional configuration in order
    to
    get
    that working. Has anyone seen similar behavior? Is there a knownresolution?
    Or a suggested way to work around the problem?
    Thank you.
    Andre

  • EJB 3.0 and jndi lookup (simple question)

    hi all,
    i am newbie on Weblogic Application Server and i have some issues,
    i have weblogic application server 10.0, also i have oracle timesten in-memory database, i have configured datasource and deploy my ejb 3.0 application, but i could not done jndi lookup?
    here is my example:
    1. one stateless session bean :
    import javax.ejb.Remote;
    @Remote
    public interface InsertSubscriber {
         public void insertSubscriber(SubscriberT subscriberT);
    } 2. here is it's implementation :
    @Remote(InsertSubscriber.class)
    @Stateless
    public class InsertSubscriberBean implements InsertSubscriber {
         @PersistenceContext(unitName = "TimesTenDS")
         private EntityManager oracleManager;
         public void insertSubscriber(SubscriberT subscriber)
              try {
                   System.out.println("started");
                   oracleManager.persist(subscriber);
                   System.out.println("end");
              } catch (Exception e) {
                   e.printStackTrace();
    }3 and my test client :
    public class Client {
         public static void main(String[] args) {
              Context ctx = null;
              Hashtable ht = new Hashtable();
              ht.put(Context.INITIAL_CONTEXT_FACTORY,
                        "weblogic.jndi.WLInitialContextFactory");
              ht.put(Context.PROVIDER_URL, "t3://192.9.200.222:7001");
              try {
                   ctx = new InitialContext(ht);
                   InsertSubscriber usagefasade = (InsertSubscriber) ctx
                             .lookup("ejb.InsertSubscriberBean");               
              } catch (NamingException e) {
                   e.printStackTrace();
              } finally {
                   try {
                        ctx.close();
                   } catch (Exception e) {
                        e.printStackTrace();
    }what i did incorrect ???
    i got error like this : Name not fount exception
    when i tried to view jndi tree on weblogic server application console i found this :
         Binding Name:     
    TimestenExampleTimestenExample_jarInsertSubscriberBean_InsertSubscriber     
         Class:     
    test.InsertSubscriberBean_o7jk9u_InsertSubscriberImpl_1000_WLStub     
         Hash Code:     
    286     
         toString Results:     
    weblogic.rmi.internal.CollocatedRemoteRef - hostID: '2929168367193491522S::billing_domain:AdminServer', oid: '286', channel: 'null'what does it mean how i can done lookup to jndi ?
    Regards,
    Paata Lominadze,
    Magticom LTD.
    Georgia.

    Hi All,
    I am using the weblogic cluster with session replication and EJB 2.0 with Local entity beans.
    for fail-over session should be replicated to another server so we can achive the same session if 1st server fails.
    Suppose i m using two managed server(server1,server2) in the cluster.I am storing the object of class ABC into session and object contains the instance of Local-EntityBean home but i put that as a transient.I have also override the readObject and write object method.
    when write object is called on 1st server,readObject method should be called on second server so we will be sure that session is replicating properly.
    pleaase find the code below : -
    public IssuerPageBean() {
    initEJB();
    private void readObject(java.io.ObjectInputStream stream) throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    initEJB();
    initializeCommonObject();
    private void writeObject(java.io.ObjectOutputStream stream) throws IOException {
    stream.defaultWriteObject();
    private void initEJB() {
    try {
    ic = new InitialContext();
    issuerHome = (LocalIssuerHome) ic.lookup("java:comp/env/Issuer");
    } catch (NamingException e) {
    e.printStackTrace();
    in my case if i am calling the constructor IssuerPageBean(),it calls the initEJB() method and lookeup the entity local home properly but when readObject method is called on another server only initEJB() method is called directly and getting the exception below :
    WARNING: Error during create -
    javax.naming.NameNotFoundException: remaining name: env/ejb/Client
    at weblogic.j2eeclient.SimpleContext.resolve(Ljavax/naming/Name;Z)Ljavax/naming/Context;(SimpleContext.java:35)
    at weblogic.j2eeclient.SimpleContext.resolve(Ljavax/naming/Name;)Ljavax/naming/Context;(SimpleContext.java:39)
    at weblogic.j2eeclient.SimpleContext.lookup(Ljavax/naming/Name;)Ljava/lang/Object;(SimpleContext.java:57)
    at weblogic.j2eeclient.SimpleContext.lookup(Ljavax/naming/Name;)Ljava/lang/Object;(SimpleContext.java:57)
    at weblogic.j2eeclient.SimpleContext.lookup(Ljava/lang/String;)Ljava/lang/Object;(SimpleContext.java:62)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(Ljava/lang/String;)Ljava/lang/Object;(ReadOnlyCont
    extWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(Ljava/lang/String;)Ljava/lang/Object;(AbstractURLContext.jav
    a:130)
    at javax.naming.InitialContext.lookup(Ljava/lang/String;)Ljava/lang/Object;(InitialContext.java:347)
    at com.lb.equities.veda.tools.salesvault.jsp.ClientPageBean.initEJB()V(ClientPageBean.java:218)
    at com.lb.equities.veda.tools.salesvault.jsp.ClientPageBean.readObject(Ljava/io/ObjectInputStream;)V(ClientPageB
    ean.java:191)
    at java.lang.LangAccessImpl.readObject(Ljava/lang/Class;Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown
    Source)
    at java.io.ObjectStreamClass.invokeReadObject(Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown Source)
    at java.io.ObjectInputStream.readSerialData(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject()Ljava/lang/Object;(Unknown Source)
    at java.util.HashMap.readObject(Ljava/io/ObjectInputStream;)V(Unknown Source)
    at java.lang.LangAccessImpl.readObject(Ljava/lang/Class;Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown
    Source)
    at java.io.ObjectStreamClass.invokeReadObject(Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown Source)
    at java.io.ObjectInputStream.readSerialData(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.defaultReadFields(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readSerialData(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Z)Ljava/lang/Object;(Unknown Source)
    at java.io.ObjectInputStream.readObject()Ljava/lang/Object;(Unknown Source)
    at weblogic.common.internal.ChunkedObjectInputStream.readObject()Ljava/lang/Object;(ChunkedObjectInputStream.jav
    a:120)
    at weblogic.rjvm.MsgAbbrevInputStream.readObject(Ljava/lang/Class;)Ljava/lang/Object;(MsgAbbrevInputStream.java:
    121)
    at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(ILweblogic/rmi/spi/InboundRequest;Lweblogic/rmi
    /spi/OutboundResponse;Ljava/lang/Object;)Lweblogic/rmi/spi/OutboundResponse;(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(Lweblogic/rmi/extensions/server/RuntimeMethodDescriptor;Lweblogic
    /rmi/spi/InboundRequest;Lweblogic/rmi/spi/OutboundResponse;)V(BasicServerRef.java:492)
    Please help .
    Thanks in Advance.
    Edited by hforever at 03/04/2008 7:28 AM

  • JNDI Lookup in OC4J *AND* Tomcat 5 (not either/or)

    I've been struggling to get a web application to deploy and run correctly on Tomcat 5.x. I couldn't ADF to look up the Datasource I'd set up in the Tomcat configs. After reading this forum post:
    Problem deploying BC4J Toy Store app on Tomcat 4
    I was able to run my test app successfully on Tomcat by prepending 'java:comp/env/' to the JNDI name of my Datasource in bc4j.xcfg. Unfortunately, specifying the JNDI name in this way breaks the JNDI lookup in the embedded OC4J container. The impression I got from the above forum post was that OC4J should be able to look up the data source when the name is specified as either jndi/myDataSource or java:comp/env/jndi/myDataSource. I can only get it to work with the former.
    Is there a way to specify the JNDI name of a datasource in bc4j.xcfg such that both Tomcat AND the embedded OC4J container within JDeveloper will be able to look it up?
    Thanks,
    -Matt

    To answer my own question, a fairly straight-forward way of achieving this is to use two configurations for the application module: one for testing locally (the supplied configuration), and another one for deployment that is a copy of the first except for the JNDI name. I can switch between the configurations via the Databindings depending on whether I want to test locally or deploy to Tomcat.
    This is certainly a useable solution, but I'm bothered by the fact that I need to reference the JNDI name in two different ways. Shouldn't this be container-independent?
    -Matt

Maybe you are looking for

  • I-pod nano 1st gen not recognized by computer

    We took this in to the apple store and had the i-pod restired, but neither of our computers (Windows XP) will recognize the i-pod nano now. It has been giving us problems for the last month, and when it did last work, it would only allow 6 songs to b

  • Here's my wish list for a versatile screensaver

    My photos have come to life because they now show as a screensaver using the built-in Leopard screensaver. I'd love to do the same for my digital videos. Here's my wish list: 1) shows photos AND video clips, mixed randomly together 2) you specify how

  • IMAP Mail Setup with self-signed SSL certs

    I am unable to set up IMAP access to an email account of mine on the new iPhone mail app. The setup stalls at "verifying" and I can't seem to save the info entered and then disable SSL in the advanced setup. Also, it doesn't seem possible to install

  • Configuration file for pkcs11 security provider

    Hi all, I'm using Mandriva 2008.0 . In the jdk 1.5.0 documentation, it is given that, the security provider pkcs11 can be configured statically by adding an entry, as shown below, in the java.security file present in the directory jre/lib/security/.

  • Creating QAS landscape on DEV server

    Hi We are planning to create a QAS landscape on the same server on which we recently installed a DEV landscape (BW 3.5).   Is it best to do a complete install of BW on the server again for QAS, or is there a better approach? Thanks for any views/expe