JNDI environment properties for EJB in deployment descriptor

Is it possible to deploy an EJB on weblogic 6.0 such that the EJBHome
object is bound using JNDI to a different JNDI server such as ldap
server instead of the weblogic server by specifying JNDI env.
properties like PROVIDER_URL, INITIAL_CONTEXT_FACTORY in the
deployment descriptor? That is use the weblogic built-in deployer but
bind the JNDI names to a different JNDI server. For this, can the
EJBHome objects be treated as just RMI (over IIOP) objects and bind
them (stubs of the RMI objects) using the Sun's JNDI service provider.
The goal is that thereafter the Home JNDI names can be looked up by
RMI clients and the interface methods invoked.
Thanks,
... arun

Must I put the war and jar files in the same ear ?
oh..ft...my boss is killing me ..
package..repackage...package..repackage..and test ??
Could anybody tell me how to refer a SLSB without put the webApp
and the EjbApp together in an Ear file ??
thanks very much!!!!

Similar Messages

  • Dynamic update of EJB/Web deployment descriptors

    In 8.1SP3, is there any provision to allow for dynamic update of EJB/Web deployment descriptors? I'm specifically looking at env var changes.
    I noticed that there are some mentions of the ability to dynamically update deployment descriptors, but it appears that the general facility has been deprecated, and they've incorporated all of the WebLogic-specific descriptor information directly into the console.
    When I dig through the JMX namespace and some of the MBean classes, I also see mentions of "deployment descriptor editors", but it's not clear how to utilize that.
    I'm aware of the fact that my application would have to be aware of possible dynamic updates to the descriptors, so I'd have to be able to implement some sort of listener for that.

    I have the same question but for a different purpose. I am part of a hosting group and we have app teams that have defined init-params in the web.xml that have to be changed as the app is promoted up through test environments and ultimately to production - only we need to be able to do this WITHOUT "cracking open" the archive.
    I was hoping to be able to script something to do the update after deployment.
    So any help at all would be appreciated. In the meantime will continue to poke around in the WLST and MBean docs.
    Thanks,
    Ed

  • How to change JNDI service provider for EJB's?

    I need EJBean's home interface to be bound to another JNDI provider, not Weblogic.
    How can I do it?
    The most simple solution is not working: to specify <jndi-name> in weblogic-ejb-jar.xml
    for bean as "xxx:bean_name".
    By JNDI rules for such names context factory with name com.sun.jndi.url.xxx.xxxURLContextFactory
    will be used. But for Weblogic this does not work. An exception is thrown during
    bean deployment -
    javax.management.MalformedObjectNameException: ObjectName: Invalid value -> xxx:bean_name
    at javax.management.ObjectName.validateAndAdd(ObjectName.java:440) at javax.management.ObjectName.initObjectName(ObjectName.java:409)
    at javax.management.ObjectName.<init>(ObjectName.java:254) at weblogic.management.WebLogicObjectName.<init>(WebLogicObjectName.java:196)
    at weblogic.management.runtime.RuntimeMBeanDelegate.register(RuntimeMBeanDelegate.java:90)
    at weblogic.management.runtime.RuntimeMBeanDelegate.<init>(RuntimeMBeanDelegate.java:83)
    at weblogic.ejb20.internal.BaseEJBHomeMBean.<init>(BaseEJBHomeMBean.java:33) ......................

    This is not an answer on my
    question - My questions was: how to force a Welogic EJB Container to BIND EJBean's
    home interface to another JNDI Service provider, not Weblogic.
    But you wrote how to use JNDI in general - I already know how to use it :)))
    Phil.
    "VSK" <[email protected]> wrote:
    Hi
    Have a look at the code below
    private Context getInitialContext () throws NamingException
    String from = "CtxHelper::getInitialContext ";
    String webLogicHostUrl = t3://SERVERNAME:9001
    Logger.debug(from, "Begin Method", 3);
    Hashtable h = System.getProperties();
    h.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory
    h.put(Context.PROVIDER_URL, webLogicHostUrl);
    return new InitialContext(h);
    } //end getInitialContext
    This way we will get the InitailContext and then do a jndi lookup using
    the
    Context object as follows
    ctx.lookup..........
    Now in the above code replace weblogic.jndi.WLInitialContextFactory by
    ur
    provider.
    Hope this helps.
    -VKS
    "Phil Peshin" <[email protected]> wrote in message
    news:[email protected]...
    I need EJBean's home interface to be bound to another JNDI provider,not
    Weblogic.
    How can I do it?
    The most simple solution is not working: to specify <jndi-name> inweblogic-ejb-jar.xml
    for bean as "xxx:bean_name".
    By JNDI rules for such names context factory with namecom.sun.jndi.url.xxx.xxxURLContextFactory
    will be used. But for Weblogic this does not work. An exception isthrown
    during
    bean deployment -
    javax.management.MalformedObjectNameException: ObjectName: Invalidvalue -> xxx:bean_name
    at javax.management.ObjectName.validateAndAdd(ObjectName.java:440)at
    javax.management.ObjectName.initObjectName(ObjectName.java:409)
    at javax.management.ObjectName.<init>(ObjectName.java:254) atweblogic.management.WebLogicObjectName.<init>(WebLogicObjectName.java:196)
    atweblogic.management.runtime.RuntimeMBeanDelegate.register(RuntimeMBeanDelega
    te.java:90)
    atweblogic.management.runtime.RuntimeMBeanDelegate.<init>(RuntimeMBeanDelegate
    ..java:83)
    atweblogic.ejb20.internal.BaseEJBHomeMBean.<init>(BaseEJBHomeMBean.java:33)

  • Defining server specific properties for EJB app

    I need to define some properties for my app which have different values depending on the server to which I deploy. Eg. the LDAP server name and port.
    When I deploy to my development server it should find the local values of the properties, when I deploy to the live server it needs a different set of values.
    What is the simplest way to do this? I obviously don't want the properties to be part of my deployment.
    Rob

    EJBs are not allowed to read or write files. But they are allowed to read from the JNDI context. The idea is to provide a symbolic name, ie <resource-env-ref>, which contains the value you need.
    The startup-classes which could set this value in the JNDI context are best documented in the OC4J User's Guide.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Error in Sun XML schema for servlet2.4 deployment descriptor?

    Hi,
    I'm including the new XML schema for version 2.4 of the servlet standard in my web.xml deployment descriptor, using http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd
    When I try to save the XML file, XMLSpy reports an error in the schema file itself: "Undefined schema component 'base' encountered - simpleContext can not have a base that is a complexType with complexContent"
    This error is on line 744, and is caused by the snippet:
    <xsd:simpleContent>
    <xsd:extension base="j2ee:nonEmptyStringType"/>
    </xsd:simpleContent>
    Can anyone explain why I'm getting a validation failure on this schema? Surely someone else must have experienced the same thing, but I can't track down any reference to it anywhere. Help!

    XMLSpy is known to be flawed. From my own experience of implementing
    validators and data-binding tools, and from my experience of working in the
    W3C Schema working group, I can tell you that there are countless cases
    where XMLSpy violates the schema specification.
    I checked the corresponding part of the schema, but it looks correct to me.
    So I suspect that this is another bug in XMLSpy.
    Try Xerces. That's probably the best in terms of conformance to the spec.

  • Setting environment properties for all EJBs

    Hi to all, is there anybody who knows how to set and read properties available to all EJBs of the same application ? I'm thinking about something like the datasource declarations in the xml descriptor (jndi-definitions.xml).
    I use BAS 4.5 and JBuilder 5.
    Thank you
    Rob

    One thing we did is to add them in a SystemValues.properties file. This works for us because all EJB's in our application extends a BaseBean and the BaseBean has a SystemValues member which contains a PropertyResourceBundle field.
    If your EJB's do not extend a common class, I guess you can still use PropertyResourceBundle to get the properties.
    PC

  • EJB deployment descriptors in clustered environment

              I was wondering how EJB deployment descriptor settings work in a clustered environment. Are the deployment descriptors per WebLogic instance they are deployed in or the entire clustered environment? For example, if my descriptor for a stateless session ejb has max-beans-in-free-pool set to 5 and I deploy this stateless ejb in 4 WebLogic instances of one cluster, does this mean that there will be a max of 5 instance of this bean in the free pool for the entire cluster or will there be a max of 20 (5 per WebLogic instance and 4 WebLogic instances in the cluster) instances of this bean for the entire cluster?
              Thanks,
              Bryan
              

    Those settings are per server instance.
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              +1.617.623.5782
              WebLogic Consulting Available
              "Bryan Dixon" <[email protected]> wrote in message
              news:3a6b51a0$[email protected]..
              >
              > I was wondering how EJB deployment descriptor settings work in a clustered
              environment. Are the deployment descriptors per WebLogic instance they are
              deployed in or the entire clustered environment? For example, if my
              descriptor for a stateless session ejb has max-beans-in-free-pool set to 5
              and I deploy this stateless ejb in 4 WebLogic instances of one cluster, does
              this mean that there will be a max of 5 instance of this bean in the free
              pool for the entire cluster or will there be a max of 20 (5 per WebLogic
              instance and 4 WebLogic instances in the cluster) instances of this bean for
              the entire cluster?
              >
              > Thanks,
              > Bryan
              >
              

  • Service Locator and JNDI Environment variables

    Hi,
    I have a class that implements the ServiceLocator pattern running into the container tier (not in a webapp), this class has a method that returns a Connection (java.sql). The problem is that I must hard code the JNDI name of the DataSource (or write it on a properties file), but I want to look for this name like a JNDI environment variable (java:comp/env/jdbc/dataSourceRefName). The class who calls the ServiceLocator is a DAO object, not an EJB. Is there any deployment descriptor tag or similar that let�s me register this name in the JNDI tree?
    Thanks.

    Hi Corujo-h,
    You'll need to declare the resource-ref in the environment
    section of the standard deployment descriptor of any component
    from which you'll invoke this ServiceLocator. So, if it's invoked
    from ejbs, you'll need to define the resource-ref for each ejb
    in ejb-jar.xml.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Initializing jndi context to call ejb??Help!!!

    hi!
    I installed j2ee sdk 1.4 ,deployed a ejb on my server.I tried to call the ejb following the example given by the
    book.:
    import javax.naming.*;
    import javax.rmi.*;
    import java.util.*;
    public class jndi {
    public static void main(String[] args) {
    try {
         Hashtable env = new Hashtable();
         Context initctx = new InitialContext();
         Object objref = initctx.lookup("java:comp/env/ejb/HelloRef");
    } catch (Exception ex) {
    System.err.println("Caught an unexpected exception!");
    ex.printStackTrace();
    the error occured:
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    then I try to initalize the jndi context:
    env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL,"ldap://localhost:389");
    Context initctx = new InitialContext(env);
    It still does not work:
    javax.naming.CommunicationException: localhost:389. Root exception is java.net.ConnectException: Connection refused: connect
    Whatcan I do to call the ejb??

    Hi, I think your original code should work ok but you should check the JNDI name of the EJB you deployed.
    In order for your lookup to work properly the JNDI name of your EJB should be "java:comp/env/ejb/HelloRef" to match the lookup in your code.
    Object objref = initctx.lookup("java:comp/env/ejb/HelloRef");
    I'd try that first, you should find the EJB JNDI name in your deployment descriptors within the jar file.

  • How to edit deployment descriptor in weblogic 9.0?

    Hi ,
    I need to edit the values of certain environment variables mentioned in the deployment descriptor of a ejb module.
    In weblogic 7,its a straight forward method in which we have the option to edit the deployment descriptor in weblogic console.
    But I'm not sure how the same can be done in weblogic 9.0.
    Please guide me..!!! its urgent...
    Thanks,
    Smita

    If you want to edit the actual deployment descriptor (ie as a developer) than using any text editor or using an IDE like WebLogic Workshop/Eclipse etc would be the way to go.
    If you're trying to change values in an already deployed application, then configuration and tunables can be changed in the admin console. These write the changes to a separate file called a deployment plan. It allows you to change performance and environment settings without disturbing the original EAR file.
    -- Rob
    WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • XML deployment descriptor generation

    How to let OC4J automatically generate ejb-jar.xml, orion-ejb-jar.xml, web.xml for me? It is a nightmare to write these deployment descriptor by hand.
    By the way, I know that JDeveloper can generate this for us, but I am not using JDeveloper 9i. Can we just let OC4J generate these files for us?
    Thanks.

    How to let OC4J automatically generate ejb-jar.xml, orion-ejb-jar.xml, web.xml for me? It is a nightmare to write these deployment descriptor by hand.
    By the way, I know that JDeveloper can generate this for us, but I am not using JDeveloper 9i. Can we just let OC4J generate these files for us?
    Thanks. Hi,
    there is no way (so far as I know) that an J2EE Application server (what oc4j is) makes the deployment descriptors, that's why they are called deployment descriptors, without them you can't deploy on any Application server.
    I personally use JDeveloper, but most current JAVA IDE's support generation of deployment descriptors.
    Basically my approach is to define the architecture within Rational Rose, which generates for me the stubs for the classes and for every ejb a deployment descriptor, later I copy all of them into one ejb-jar.xml and open the whole bunch with JDeveloper, it works fine with 903 preview, although there are some problems with the 902 version of JDeveloper.
    Which IDE are you using?
    --hery                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • EJB & Servlet deployment in Clustered Env.

              Hi,
              I have made a cluster of 3 weblogic servers. I would like to send a request to one
              server (e.g. http://myserver1:7001/TestServlet). The servlet utilizes an EJB which
              is not located and not deployed on myserver1 , but on other 2 servers in the cluster.
              The algorithm is round-robin. It gives me a lot of errors (Impl... classes not found
              etc etc).
              Do I have to deploy everything on all the servers?
              If I do that, the request is not routed to other servers. Since the servlet finds
              the EJB locally, it never goes to the other servers, regardless of the algorithm.
              I have set up the "home-is-clusterable" and all other relevant properties for EJB
              deployment.
              Any ideas??
              Sharad
              

    If the ejb is deployed on the server that is looking for the ejb, then it
              won't go network to use the ejb. That is a "big" WL optimization, and helps
              quite a bit for most apps.
              If you want to segregate the ejb and web functionality, you should probably
              consider running two distinct clusters (in 5.1 parlance).
              I suggest putting web and ejb together though and clustering that. Latency
              is lower. Scalability is not particularly affected. Configuration is much
              simpler.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              +1.617.623.5782
              WebLogic Consulting Available
              "Sharad Joshi" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Hi,
              >
              > I have made a cluster of 3 weblogic servers. I would like to send a
              request to one
              > server (e.g. http://myserver1:7001/TestServlet). The servlet utilizes an
              EJB which
              > is not located and not deployed on myserver1 , but on other 2 servers in
              the cluster.
              > The algorithm is round-robin. It gives me a lot of errors (Impl... classes
              not found
              > etc etc).
              >
              > Do I have to deploy everything on all the servers?
              > If I do that, the request is not routed to other servers. Since the
              servlet finds
              > the EJB locally, it never goes to the other servers, regardless of the
              algorithm.
              > I have set up the "home-is-clusterable" and all other relevant properties
              for EJB
              > deployment.
              >
              > Any ideas??
              >
              > Sharad
              

  • Clobbered manifest when editing deployment descriptors

    I'm running WebLogic server 6.1. I deploy an ear file that consists of one EJB
    module (a session bean) and several extra jars, which contain client classes to
    other beans and some utility classes. The session bean jar's manifest file includes
    a classpath entry listing the extra jars in the ear. However, when I edit some
    environment variables in the EJB's deployment descriptors through the console,
    this manifest file is replaced and the classpath entry does not appear in the
    new manifest. This makes the ear file undeployable. Is this a documented bug?
    Is there a fix or workaround?

    I'm running WebLogic server 6.1. I deploy an ear file that consists of one EJB
    module (a session bean) and several extra jars, which contain client classes to
    other beans and some utility classes. The session bean jar's manifest file includes
    a classpath entry listing the extra jars in the ear. However, when I edit some
    environment variables in the EJB's deployment descriptors through the console,
    this manifest file is replaced and the classpath entry does not appear in the
    new manifest. This makes the ear file undeployable. Is this a documented bug?
    Is there a fix or workaround?

  • EJB/8i deployment and SSL

    Hello JDev Team,
    I want to use SSL encryption and authentication in my InfoSwing BC4J Oracle8i application.
    For Local Deployment it's quite transparent you just define appropriate LocalConnection class and SSL works fine.
    But for EJB/8i Deployment it's not that clear. As I understand EjbConnection class can accept user/password authentication only.
    Do I have to extend oracle.dacf.dataset.connections.Connection class and create my own SSL-oriented Connection with my own setConnectionSpecificEnvs method? Is that a possibility?
    Could you please give me some directions on this case?
    Thanks,
    Victor
    null

    Please check the "How to's" in the JDeveloper section of OTN (http://otn.oracle.com). That should shed some light.
    Happy researching,
    Rajesh

  • Weblogic Deployment Descriptor for CMP EJB

    Hi all,
    Am new to EJB, CMP. Pls help me how to write deployment descriptors for the CMP EJB for Weblogic.
    Give me the list of the Deployment descriptors needed and also pls give me some samples
    thanks in advance
    rgds
    Ravi Bharathi

    The easiest way is to go through some tutorial or refer the code samples. If you have installed weblogic, there are examples provided in the weblogic installation folder itself for each type of bean. Basically for cmp you have to provide the table names and mapping between the class variables to db fields in weblogic_cmp_rdbms.xml deployment descriptor.

Maybe you are looking for

  • Apex_util.get_print_document with bind

    All, I'm trying to create a process to bulk print a report to the file system using the API apex_util.get_print_document. Is there a way to pass bind variables to the report query when using this API? If not, has anyone come up w/another solution on

  • Using 48KHz & 32KHz in the same FCP sequence. Some say yes, some say no?

    Can anyone please, please help resolve the conflicting info I'm getting regarding using 48KHz & 32KHz material in one sequence. Forum user and generally smart-cookie Studio X says: You need convert the 32/12 audio to 48/16; otherwise it will drift ou

  • See my query problem for sub query

    hi master Sir see my query select lpad(' ',2*(level-1)) || to_char(chartofacc.child),parent,accid as accounted ,title, case when fstatus=1 then (select sum(drbal) from accbal where parent = accounted) when fstatus is null then (select drbal from accb

  • Un-purchased Applications Needing Updates?

    Hi, I just recently purchased the Photography plan with Adobe CC. So this comes with Photoshop CC and Lightroom, and all of that works fine. However, in the Creative Cloud tab, it says that many applications in addition to that need updating (see scr

  • OBIEE Dial Graph

    Hi all, I'm using OBIEE 11.1.1.6 on Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production My fact is something like this: Service    Ratio     Ratio_Green_Orange    Ratio_Orange_Red S1         73        95                    90