How create  EJB 2.1 Stateful Session Bean in a EJB 3.0 Session Bean

Hi All,
We have been developing on EJB 2.1. We are now adding a module on EJB 3.0.
How can we "create" a stateful session bean with create method signature similar to create(String id)?
We have tried
// this is the remote interface
@EJB AddressBean abean;
But not working
Any help will be appreciated.

There is no explicit create() call for EJB 3.0 session beans. It doesn't really matter though
since you can accomplish the same thing by defining your own business method to act
as an initializer for whatever state you'd like. E.g.
@Remote
public interface FooInterface {
public void initialize(String id);
// ... other business methods
@EJB FooInterface fooRef;
fooRef.initialize("foo");
--ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • How to avoid Invalidation of Stateful Session Bean in case of an Exception?

    Hi developers,
    I'm working on a project using JSF, Toplink and EJB 3.0 using JDev.
    I'm using a statefull session bean that is stored in the session but when an exception occurs in a business method in the stateful bean the bean crashed and can never be reused and returns the following trace :
    06/06/05 10:19:12 java.rmi.NoSuchObjectException: Session has timed out or was invalidated
    06/06/05 10:19:12      at com.evermind.server.ejb.StatefulSessionEJBObject.throwPassivisationException(StatefulSessionEJBObject.java:335)
    06/06/05 10:19:12      at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_transactionPreExecute(StatefulSessionEJBObject.java:717)
    06/06/05 10:19:12      at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:51)
    06/06/05 10:19:12      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
    06/06/05 10:19:12      at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    06/06/05 10:19:12      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
    06/06/05 10:19:12      at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:840)
    06/06/05 10:19:12      at PriseChargePS_StatefulSessionBeanWrapper21.trouverAssure(PriseChargePS_StatefulSessionBeanWrapper21.java:1747)
    06/06/05 10:19:12      at Pensions.Traitements.AssureTraitement.donnerAssure(AssureTraitement.java:130)
    06/06/05 10:19:12      at Pensions.view.backing.priseCharge.PriseCharge.chercherAssure_action(PriseCharge.java:189)
    06/06/05 10:19:12      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    06/06/05 10:19:12      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    06/06/05 10:19:12      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    06/06/05 10:19:12      at java.lang.reflect.Method.invoke(Method.java:585)
    06/06/05 10:19:12      at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
    06/06/05 10:19:12      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
    06/06/05 10:19:12      at javax.faces.component.UICommand.broadcast(UICommand.java:312)
    06/06/05 10:19:12      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
    06/06/05 10:19:12      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
    06/06/05 10:19:12      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
    06/06/05 10:19:12      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    06/06/05 10:19:12      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
    06/06/05 10:19:12      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    06/06/05 10:19:12      at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    06/06/05 10:19:12      at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
    06/06/05 10:19:12      at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
    06/06/05 10:19:12      at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
    06/06/05 10:19:12      at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
    06/06/05 10:19:12      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:629)
    06/06/05 10:19:12      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
    06/06/05 10:19:12      at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
    06/06/05 10:19:12      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
    06/06/05 10:19:12      at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
    06/06/05 10:19:12      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
    06/06/05 10:19:12      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
    06/06/05 10:19:12      at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    06/06/05 10:19:12      at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
    06/06/05 10:19:12      at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
    06/06/05 10:19:12      at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
    06/06/05 10:19:12      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    Please help !

    Your question is not how to create/compile a stateless session bean, you are asking how to use those weblogic specific annotations. A weblogic forum is a better place to ask that.

  • How to use a session bean in another session bean (or an EJB in a session)

    JDev 11.1.1.4, WLS 10.3.4, Windows 7 x64
    I have a login controller with a session-scoped bean that manages logins.
    I have another session-scoped bean that manages menu security.
    both modules compile and work fine now I need to share the data from one to another.
    I need to reference the login controller in the menu security bean. How do I reference (include) the login bean in the security bean?
    I tried an EJB - what a farce - these are supposed to be universal and easy ( basis of the oop in Java).
    the bean is defined:
    @Stateless(name = "SecurityEJB", mappedName = "ZITASApplication-ZITASModel-SecurityEJB")
    I have tried :
    ic = new InitialContext();
    session = (SecurityEJBLocal)ic.lookup("ZITASApplication-ZITASModel-SecurityEJB#model.security.logic.SecurityEJB");
    session = (SecurityEJBLocal)ic.lookup("ZITASApplication-ZITASModel-SecurityEJB#model.security.logic.SecurityEJBLocal");
    session = (SecurityEJBLocal)ic.lookup("java:ejb/model.security.logic.SecurityEJB");
    session = (SecurityEJBLocal)ic.lookup("java:ejb/SecurityEJB");
    session = (SecurityEJBLocal)ic.lookup("java:app/SecurityEJB");
    session = (SecurityEJBLocal)ic.lookup("java:module/SecurityEJB");
    All return null pointers and claim the name cannot be resolved.
    As you can see - I have found various claims to how to do this.
    One way says create a sevlet, generate a listener and use the sevlet. Basically one for every EJB - a lot of work to use the EJBs
    I would assume that this would be one of the easiest parts of java - as it is the foundation of re-usability and oop.
    I can do either in the application - the added complexity of the EJB is less desirable - but better programming?

    Hi,
    ic.lookup("ZITASApplication-ZITASModel-SecurityEJB#model.security.logic.SecurityEJB");This should work with remote interface. If you want to lookup local interface, you need to register it in web.xml. Quote:
    To access the business local interface you need to define ejb local references for your component environment (i.e. from your servlet environment). You can do this by defining references in your web.xml. For example:
    <ejb-local-ref>
    <ejb-ref-name>ejb/BusinessLogicBean</ejb-ref-name>
    <local>packagename.BusinessLogicBean</local>
    </ejb-local-ref>
    To lookup your local reference from your servlet you need to use the following JNDI reference:
    java:comp/env/ejb/BusinessLogicBean Another one
    First, declare a local ejb reference in your web.xml file (This will add it to JNDI):
    <ejb-local-ref>
    <ejb-ref-name>ejb/Foo</ejb-ref-name>
    <local>simple.ejb.FooLocal</local>
    </ejb-local-ref>
    Then it can be looked up from JNDI:
    InitialContext ctx = new InitialContext();
    FooLocal foo = ctx.lookup("java:comp/env/ejb/Foo");Hope this helps.
    Pedja
    Helpful links (judging from your first post, you are probably sick of these :) )
    How to lookup local EJB in Oracle Weblogic 10.3
    http://m-button.blogspot.com/2008/07/reminder-on-how-to-use-ejb3-with.html
    http://www.coderanch.com/t/451012/EJB-JEE/java/EJB-Local-Lookup-not-working

  • SAME EJB 3.0 Stateful Session bean for different JSP sessions returned

    Forum,
    I have a strange problem utilizing stateful session beans. Please note, that I am using jdeveloper for the following:
    1) Here is a basic stateful session bean:
    @Stateful(name = "DemoClass")
    public class DemoClassBean implements DemoClass,
               DemoClassLocal, SessionSynchronization {
          public static int id=0;
          public DemoClassBean() {
          id++;
          public int getId() {
             return id;
          //... other methods
    }2) This bean is accessed from a JSP for testing purpose, I am copying only the script used in JSP:
    <%
       DemoClass bean = null;
       try {
          bean = (DemoClass) ((new javax.naming.InitialContext()).
                       lookup("DemoClass "));
          System.out.println("ID=" + bean.getId() );
          } catch (javax.naming.NamingException e) {
             // TODO
    %>If this page is addressed by different clients, from different browsers, the same bean is returned.
    Here is what I see in the logs:
    ID=1
    ID=1
    ID=1
    The same problem is being observed when this session bean is accessed from a JSF Backing bean.
    What could be wrong? Is this a bug in oc4j / jdeveloper (version 10.1.3.3.0)?
    Edited by: smw000000001 on Nov 17, 2008 10:52 AM

    Hi,
    The code for stateful is perfectly fine and working in a normal way. The way you are trying to implement the stateful session bean in your application is wrong.
    think of binding the stateful session bean with HttpSession object.
    So that you will get a unique stateful session bean object.

  • How do I access session data through an EJB?

    Hi
    How do I access session data through an EJB?
    I am currantly developing a Web service (using ejb's, JBoss.net and Apache Axis). A client making a call to this Web service, is expecting a bussiness-object in return. My problem is that this bussiness-object i stored in a users session data. How do I retrieve this bussiness-object from the users session.
    I have read that this does not work with httpsessions, is this true? If this is true, is it possible to store the bussiness object in a JavaBean e.g:
    <jsp:useBean id="userContextWebImpl" scope="session" class="com.ac.march.client.UserContextWebImpl">
    <%
    String key = "test";
    String value = "This is the value";
    userContextWebImpl.setValue( key, value1 );
    %>
    </jsp:useBean>
    and then retrieve this information through the EJB? Or is it possible to do this by using Statfull JavaBeans? Or can this be done through a nother solution?
    Please help!

    I have created a JavaBean with scope="application" to store some data. The data is stored when a user prefomes a spesific task.
    A different person then makes a call to a Web-Service on the server. The Web-Service then asks an EJB to retrieve the data stored in the JavaBean (servlet cotext). In other words: How do I retrieve this data from the EJB?
    I have tried with this code, but with no luck.
    (ApplicationContextWebImpl is the JavaBean)
    public static String getBookingResult( String key )
         String myResult = null;
         String myKey = key;
         ApplicationContextWebImpl applicationContextWebImpl = null;
         try
              applicationContextWebImpl = new ApplicationContextWebImpl();
              myResult = (String)applicationContextWebImpl.getValue( key );
         catch ( java.rmi.RemoteException e )
         return myResult;
    }

  • EJB 3.0 Stateful - Limiting number of bean instances

    Hello EJB Experts,
    I have just started to learn EJB 3.0 and have some basic queries. The application server that I am using is Glassfish. Please find my queries below:
    1. To remove an bean instance from the container, we can use the annotation '@Remove'. I basically had 2 methods and annotated the 2nd method with '@Remove'. Whenever the 2nd method is called, the container is removing this instance also in my program. My problem is that, i might get some invalid parameter values in the 2nd method, so in that case I have to just log the error message and whenever the input parameters are correct, then only the instance should be removed. But lets say, if someone calls my 2nd method with invalid parameters, I log the message and the container removes it, but after some time if the 2nd method is called with correct parameters, then the instance will not be available. Can we programatically tell the container when to remove a bean instance?
    2. From the docs, I am clear that pooling works only for 'Stateless' beans. I however (I am using 'Statuful' bean), wanted to limit the max number of instance to 2. I did below mentioned configuration in the 'sun-ejb-jar.xml' file:
    <bean-cache>
                        <is-cache-overflow-allowed>false</is-cache-overflow-allowed>
                        <cache-idle-timeout-in-seconds>1</cache-idle-timeout-in-seconds>
                        <max-cache-size>2</max-cache-size>
                        <resize-quantity>0</resize-quantity>
                        <removal-timeout-in-seconds>2</removal-timeout-in-seconds>
                        <victim-selection-policy>LRU</victim-selection-policy>
              </bean-cache>
    But i think, it is still creating more that 2 instances of this bean.
    Please help me in getting answers to these questions. I will be very thankful for your replies.
    Regards,
    San
    Edited by: SolarisUser1 on Jun 27, 2010 11:00 PM

    @Remove is used for stateful EJBs and you call it when your client has finished using that instance of the stateful EJB.
    If you are passing in parameters to the method and letting it do some work with your parameters then perhaps it should not be a remove method at all. Make it a normal method and only put cleanup related logic in the remove method. You can also throw some application exception and rollback if the parameters are not correct.

  • EJB 3.0 Stateful bean not saving state while Stateless bean is !!!

    My Stateless bean is as follow:
    package test;
    import javax.ejb.Stateless;
    @Stateless(mappedName = "StatelessBean")
    public class StatelessBean implements StatelessBeanRemote {
         int counter;
         public void increment(){
              System.out.println("Stateless counter value:"+counter);
              counter++;
    My Stateful bean is as follow:
    package test;
    import javax.ejb.Stateful;
    @Stateful(mappedName = "StateFulBean")
    public class StateFulBean implements StateFulBeanRemote {
         int counter;
         public void increment(){
              System.out.println("Stateful counter value:"+counter);
    Client is as follows:
    package test;
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    public class TestClient {
         public static void main(String[] args) {
              Hashtable hashtable = new Hashtable();
              hashtable.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
              hashtable.put(Context.PROVIDER_URL, "t3://localhost:7001");
              InitialContext ic;
              try {
                   ic = new InitialContext(hashtable);
                   StateFulBeanRemote stateFulBeanRemote = (StateFulBeanRemote)ic.lookup("StateFulBean#test.StateFulBeanRemote");
                   stateFulBeanRemote.increment();
                   StatelessBeanRemote statelessBeanRemote = (StatelessBeanRemote)ic.lookup("StatelessBean#test.StatelessBeanRemote");
                   statelessBeanRemote.increment();
              } catch (Exception e) {
                   e.printStackTrace();
    The output i am getting after running the client twice is as follows:
    //first time
    Stateful counter value:0
    Stateless counter value:0
    //second time
    Stateful counter value:0
    Stateless counter value:1
    Shouldn't the counter values be incremented in case of Stateful bean and remain the same for Stateless bean. But the output that I am getting is the complete opposite !!!
    Can anyone please explain this confusing behavior of stateless and stateful ejb 3.0 beans.

    868664 wrote:
    Can anyone please explain this confusing behavior of stateless and stateful ejb 3.0 beans.It is very simple: a stateless bean is ASSUMED to be stateless; you cannot keep state in a stateless bean as a contractual rule. That doesn't mean that you will fail to keep state in them at least for a little while, they are still only Java objects. Generally stateless EJBs are pooled, so you may get the same instance each time you use such an EJB, but you may just get another one. It is not dependable and the rules say don't do it - so don't do it.
    A stateful bean is tied to a single client, and so can be used by a client to keep state in it. Since You are running the client application twice you are operating with two different clients and so you will get a new stateful bean each time and your code will keep printing 0. However there is also a bug in your code:
    public void increment(){
    System.out.println("Stateful counter value:"+counter);
    }You are not incrementing anything.

  • How to get bean information in EJB 3.0

    Hi all
    Can anyone tell how we can get the beans , I mean ejb beans related information deployed in the Netweaver AS programatically...  I am using EJB 3.0.
    thanks
    Rafi.

    Hi Rafi,
    Currently you can't do this programatically, the information is only available in the SAP NetWeaver Administrator. You could of course try JMX / MBeans but bear in mind that this is not officially supported and may be changed in the future.
    Check also my reply in this [thread|parsing ejb-jar.xml using jaxb;.
    HTH!
    \-- Vladimir

  • Session Facade Pattern without EJB

    All of the session facade pattern examples that I can find are heavily emphasized on EJB. I am planning on implementing a system without EJB's, and am interested in the advantages of using the Session Facade pattern.
    Are there any good examples of using the Facade pattern outside of EJB to build a java server system? If there aren't, is there a better way to implement this type of strategy in a non-EJB system?

    What is the best way to allow the client to
    interact
    with Entity objects, without exposing them. ShouldI
    implement Value objects that are easily serialized
    for transfer across the network?
    If you are not using EJB or a distributed
    architecture, you do not need DTO's or VO's. They
    are an odious construct used to obviate the
    shortcomings of remote method calls over anetwork.
    I strongly disagree.
    They are an obvious and easy model used when the
    following characteristics of a system exist.
    - Different layers.
    - Related data items that are moved throughout the
    layers.
    - Different usage of the related data items by
    different layers.
    Yes, I agree. Note the qualification 'if you are not using a distributed architecture'.
    None of that has anything to do with remote method
    calls over a network. Point of fact the first time I
    used them was in a stand alone application with no
    network traffic except that needed by the database
    driver itself.
    Simply create your domain model objects as POJO's
    s (plain ole Java objects). Persist and retrieve
    your objects via DAO's (data access objects).Your
    service layer (facade) will sit on top of thedomain
    model, encapsulating method calls into logicalunits
    of work.
    And how exactly do you move the customer
    name/customer address from the DAO to the GUI level?I am assuming the dedicated remoting product the OP specifid, Hessian, will handle moving between the tiers, or at least between the controller/view and the business tier.
    - Saish

  • How to get File Reference of a properties file from EJB

    Hi,
    I am using Sun App server 7 with Oracle 9i. I am keeping all my SQL statements in a properties file from which I am loading it while making a database operation from Stateless beans. My problem is I am not able to get the reference of the properties file. Here is the code through which I am getting the SQL statements loaded to a cache.
    String sqlFileName = "SQL.properties";
    sqlCache.load(new FileInputStream(sqlFileName));
    From the cache I am sending the SQL statement depending on the key value. But the problem is I have to keep the SQL.properties file on the App Server config directory of the instance where the server.xml file resides. Otherwise it is not able to find the properties file. But I don't want to put the properties file on the config directory of the server instance. Please help how to get the properties file from the packakge. My file is residing inside a package com.company.sql . Botht the properties file and the class accessing the file are residing in the same package. Please help how to get the reference of the file with out putting the file in the config directory.
    Thanks
    Amit Patnaik

    Just wanted to warn you of the hazards if you read a file from EJB
    So please make sure that these hazards will not affect your application. However the solution suggested to use getResourceStream() concurs with ejbSpec
    This snippet is from suns blueprint on ejb
    Why can't EJBs read and write files and directories in the filesystem? And why can't they access file descriptors?
    Enterprise beans aren't allowed to access files primarily because files are not transactional resources. Allowing EJBs to access files or directories in the filesystem, or to use file descriptors, would compromise component distributability, and would be a security hazard.
    Another reason is deployability. The EJB container can choose to place an enterprise bean in any JVM, on any machine in a cluster. Yet the contents of a filesystem are not part of a deployment, and are therefore outside of the EJB container's control. File systems, directories, files, and especially file descriptors tend to be machine-local resources. If an enterprise bean running in a JVM on a particular machine is using or holding an open file descriptor to a file in the filesystem, that enterprise bean cannot easily be moved from one JVM or machine to another, without losing its reference to the file.
    Furthermore, giving EJBs access to the filesystem is a security hazard, since the enterprise bean could potentially read and broadcast the contents of sensitive files, or even upload and overwrite the JVM runtime binary for malicious purposes.
    Files are not an appropriate mechanism for storing business data for use by components, because they tend to be unstructured, are not under the control of the server environment, and typically don't provide distributed transactional access or fine-grained locking. Business data is better managed using a persistence interface such as JDBC, whose implementations usually provide these benefits. Read-only data can, however, be stored in files in a deployment JAR, and accessed with the getResource() or getResourceAsStream() methods of java.lang.Class.
    Hope this info helps!

  • How Create LDAP Group Inside Active Sync Form?

    I have an Active Sync form that is working well to synchronize (and slightly massage) data from an Active Directory source to a Sun Directory Server destination.
    I need to synchronize group information from AD to DS. It must automatically create groups during the Active Sync processing. It can't be done externally using another scripting language; it must be done within IdM.
    I have the following code...
    <Action id='0' application='com.waveset.provision.WorkflowServices'>
    <Argument name='op' value='createResourceObject'/>
    <Argument name='object'>
      <Object>
      <Attribute name='resourceId' value='DS'/>
      <Attribute name='resourceName' value='DS'/>
      <Attribute name='resourceType' value='LDAP'/>
      <Attribute name='objectName' value='abcd'/>
      <Attribute name='attributes'>
        <Object>
        <Attribute name='cn' value='abcd'/>
        <Attribute name='groupType' value='abcd'/>
        </Object>
      </Attribute>
      <Attribute name='objectType' value='group'/>
      <Attribute name='objectId' value='CN=abcd,ou=Groups,dc=blah,dc=com>
      </Object>
    </Argument>
    <Argument name='objectType' value='group'/>
    <Argument name='resourceId' value='DS'/>
    </Action>However with that code inside the <Field><Expansion>...</Expansion><Field> section the group is not created. I've enabled tracing and as best I can determine the code isn't even executed.
    I have created resource schemas for accounts[DS].ldapGroups and accounts[AD].groups and that works well. I can read group memberships from those lists. However I can't simply append to those lists to automatically create groups (which would be nice). That's why I've gone down this path of attempting to create the groups programatically.
    I've scoured the groups and the course notes and found nothing relevant here. The examples all refer to creating the groups within an interactive form. I'm trying to do the same within the <Field> section of an Active Sync form.

    TTSLSAB wrote:
    Hi Vladimir,
    can you please tell me what should i import in the java class inorder to avoid the below error (session) for the line
              Resource resource = (Resource)session.getObject(Type.RESOURCE, resId);
             ResourceAdapter ra = ResourceOp.findAdapter(resource, session.getCache());Error, which i am getting is
    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
         session cannot be resolved
         session cannot be resolvedsession is your LighthouseContext handle so depending on how you are implementing the class you quoted, you will either need to pass it in, for example via the invoke tag from your form/workflow, or get your own - don't know how this is done but I'm assuming authenticating to IdM would have to be done.
    For all those interested, I have implemented the Java code snippet listed by Vladimir in XPRESS.
    idmSessionHandle - is the LighthouseContext for the current session
    currentOUDN - is a string representing the AD DN of the OU to be created
                    <defvar name='resourceAdapterHandle'/>
                    <set name='resourceAdapterHandle'>
                      <invoke name='findAdapter' class='com.waveset.provision.ResourceOp'>
                        <ref>resourceObject</ref>
                        <invoke name='getCache'>
                          <ref>idmSessionHandle</ref>
                        </invoke>
                      </invoke>
                    </set>
                    <defvar name='newOUGenericObject'/>
                    <set name='newOUGenericObject'>
                      <new class='com.waveset.object.GenericObject'>
                        <map>
                          <s>objectId</s>
                          <ref>currentOUDN</ref>
                          <s>objectType</s>
                          <s>Organizational Unit</s>
                        </map>
                      </new>
                    </set>
                    <invoke name='createObject'>
                      <ref>resourceAdapterHandle</ref>
                      <ref>newOUGenericObject</ref>
                      <new class='java.util.HashMap'/>
                    </invoke>
    [...]Although the above works well, to create OUs in AD, I have not yet tested its real life application with regards to the initial mass loading of users (from LDAP (auth source) to IdM to AD) and ActiveSyncing. My concerns are two threads attempting to create the OU at roughly the same time, the first succeeds, and second one fails because AD will reply with the fact that the object already exists. The workaround would be to do a recheck of the existence of the OU, after a failure was encountered. This ties into exception handling in general in this approach.
    If anyone can contribute exception handling and possibly a create with retries approach, to the above code, I'd appreciate it.
    Cheers.

  • Access bean(wrapper) for EJB

    How can I develop access bean(wrapper) for EJB in JDeveloper?

    Search the Internet for a product called JACOB
    JAva COm Bridge

  • How to open a URL without session ID and reuse the current browser session?

    Hi All,
    I have a question about HTMLDB 2.0
    How to open a URL without session ID and reuse the current browser session?
    That was the behaviour in HTMLDB 1.6 ...
    My usecase for this is the following:
    We have written an issue tracking application, which sends e-mail to the interested users, when something happens.
    In these email we've put a link to some page, with some parameters in the URL.
    The idea is for the user to be easy to click on the hyperlink and to see the details of the ticket.
    When the user clicks on such a link he is directed to a login screen (page 101) and he enters his Username and password, and is then forwarded to the details for the ticket.
    Then he receives another email (e.g. for another ticked). He clicks on the link and :
    a) in HTMLDB 1.6 he goes to the details as he didn't close his browser and session is remembered
    b) in HTMLDB 2.0 he is prompted to enter username, password with the username populated
    Please tell me how can I achieve the same behaviour in HTMLDB2.0 as it was in HTMLDB 1.6.
    I understand this change is somehow security related, althogh I don't understand how. If you can explain this either I would be very happy?
    Best regards,
    Mihail Daskalov

    Mihail - I detailed a couple of approaches here: Re: Application Link
    Scott

  • In RSA Authentication Manager 7.1, how create multiple security domains

    Hi,
    RSA Authentication Manager 7.1 in configured with LDAP(Sun java system directory server); how create multiple security domains 7.1, is this security domains is releted to LDAP?
    thanks

    I think what you need to do is create an identity sequence with RSA as the selection in
    Authentication and Attribute Retrieval Search List and AD in Additional Attribute Retrieval Search List. Then select this sequence as the result in the identity policy for the service

  • How create animation in oracle forms 6i

    any one can guide me how create animation in oracle forms 6i

    hello to every one..
    my dear friend developer is a busniness application tool.you can create
    animaiton on flash and other animaiton softwares and then you can call on froms.
    best regard
    amk

  • How create header with user id time date to VC-report's output as display ?

    How create header with user id time date to VC-report's output as display ?
    This info should come from the VC - not all the way from R3-side via FunctionModule/BABI. So only userid, date, time to output as normal text (which is not editable of course). Thanks =)

    Hi ann-mari
    Go through following link may it help u
    Form Item disabled based on portal role
    /people/community.user/blog/2007/01/17/visual-composer-explorations-using-portal-roles-to-influence-ui-element-behavior
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/vc/usingrolestoinfluenceapplication&
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/vc/passingvaluesvia+URL&
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ad182ac7-0a01-0010-4fb8-8a4d217b19c1
    Best Regards
    ````Satish````

Maybe you are looking for

  • Getting values from jsp in portlet

    Hi, I want to know if I submit values from a jsp page how can get those values in the portlet class (extends Generic portlet). I have tried accessing using actionRequest.getParameter() and also renderRequest.getParameter(). But I get null value . Do

  • Error Message when starting Lightroom

    When I start Lightroom 3.0 I occasionally get the following error message. My RAW files are read from an external HD that has an automatic spin down "feature" that I can't de-activate. I suspect that may be the source of the problem. Can anyone confi

  • Appleworks 5 files won't work with Pages, appearing as UNIX files

    I realize Pages will not open Appleworks 5 files. However, for some reason, when I copied my Appleworks 5 files onto a hard drive and put them on my PPC G4 iBook running OS 10.4, the icons for the files are appearing as unix executable files. I had n

  • LR5 Develop Module, Tone Curve gone missing.

    Hi can anyone suggest how I can get the Tone Curve back. I've done all the usual checks. One day it was there and the next it was gone. I'm using a MacBook Air.  (no problem with LR5 on my MBP)

  • Using Places in Aperture 3.01

    I do not have a GPS enabled camera but would like to add places data to my photos. When I click the Places icon it takes me to a world map that says "Places is Currently Disabled. To re-enable open the Advanced panel in Preferences and set Look Up Pl