Remote worklist implementation

Hi,
We are building our own worklist app based on HW, and I want to run all the front-end stuff on a different server (partly to use jdk5) and use a remote worklist service, but I want to keep the code the same in case we decide to switch to local later on. I used a Proxy instance to use the RemoteWorklistServiceClient transparently, but the RemoteWorklistService returns different types for the same method names (oracle.tip.pc.services.hw.task.impl.Task instead of IWorklistTask and so on).
I can maybe go on hacking with Proxies, but I'm not clear why you have two different APIs. Are you planning to have them implement the same interface eventually? If not, is there another client/ejb I can use?
On a related note, when will the product support jdk5?
Best wishes
John Prince

Hi John,
I have forwarded your request to conserned person. Will revert to you soon.
Dhaval

Similar Messages

  • Worklist implementation

    Hi, I need to use the worklist implementation provided by SOA. Can any one please let me know the Jar file and the taskflow that i need to import to use the same?

    Hi,
    Have a look at this...
    http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/bp_worklist.htm#SOASE810
    Cheers,
    Vlad

  • Is the remote interface implemented by some class

    Hi,
    I have a simple question, googled, no help.
    I am trying to udnerstand, where exactly is the remote interface implemented ?
    I mean, i know that it contains all the business methods which have a body in the bean.
    But is the remote interface implemented somewhere ? Is there any class which implements the Remote interface ?
    thanks
    S

    Sarvananda wrote:
    Hi,
    I have a simple question, googled, no help.look better...
    I am trying to udnerstand, where exactly is the remote interface implemented ?
    I mean, i know that it contains all the business methods which have a body in the bean. so, that's what implements it :)
    But is the remote interface implemented somewhere ? Is there any class which implements the Remote interface ?
    the bean class :)
    But the actual implementor is a class generated by the appserver that delegates to the bean class.

  • High PPI Support Multiple Monitors: How it comes that Remote Desktop implements the hight PPI support very well and win 8.1 doesnt?

    http://skovalev.de/wp-content/uploads/2014/05/RemoteDesktop-HighPPI-Perfect.png
    Hello all: i am using an High PPI Monitors from Dell XPS15 (3600x1800) and a Normal FullHD above it. The FullHD monitor is an external device and is set up as the primary device. Scaling is set to per Monitor DPI.
    Now the Question: how it comes, that my RemoteDesktop on the secondary (internal) screen has almost perfect implementation for this????
    BUT i am am talking only about the RemoteDekstopManager, normal one does not works with high ppi in this way... Also ModernUI has no problems with scaling
    http://skovalev.de/wp-content/uploads/2014/05/Firfox-and-Resolution-RemoteDesktop.png
    NOTE that the resolution on the remote desktop is set to 1600x900 and there are NO scaling problems even on the 3200x1800 monitor!
    On both picutures you find the dell monitor on the bottom and the scaled original windows explorer/firefox on the bottom right. See how blurry it is? I really breaks my eyes :(
    I hope Microsoft can finally fix the high PPI Monitors issue, since the solutions seems to be already implemented

    No, i mean the Scaling Support.
    If you use multiple monitor, in windows 8.1 you can scale per monitor. If you use this option with a High PPI monitor, like ultra HD or 4K, the image on the monitors with other PPI than the main monitors appears fuzzy and blury.
    But there are also scaling problems even if you use only single monitor. This article blog describes it pretty good:
    http://www.hanselman.com/blog/LivingAHighDPIDesktopLifestyleCanBePainful.aspx
    By the way there are lot article like this describing the scaling problems, not only by users but also by professinals and IT magazines...
    BUT here it comes: watch @ my screenshots. If the remote desktops resolution is 1800x900 and the native resolution is 3600x1800, there are no scaling problems! HOW? So like you can see on my screenshots a native application on my monitor appears fuzzy while
    the same application runnin of the remote desktop has clear type!
    That means for me, that windows HAS the possibility to scale clearly, but somehow this feature is only supported by RDCM...

  • BPMAuthorizationService in remote worklist app via SOAP

    Hi;
    I'm trying to write a worklist app (plain Java app for now) that, among other things, retrieves a workflow user's email address.
    String userId = "jstein";
    String password = "welcome1";
    // Get workflow service client for SOAP
    IWorkflowServiceClient wfSvcClient =
    WorkflowServiceClientFactory.getWorkflowServiceClient( WorkflowServiceClientFactory.SOAP_CLIENT );
    // authenticate the workflow user ** this works correctly **
    IWorkflowContext wfCtx =
    wfSvcClient.getTaskQueryService().authenticate( userId, password, oracle.tip.pc.services.identity.config.ISConfiguration.getDefaultRealmName(), null );
    // get the BPM Auth service so we can look up users' info ** this fails due to connection timeout on localhost:9700 **
    BPMAuthorizationService bpmauth = wfSvcClient.getAuthorizationService( oracle.tip.pc.services.identity.config.ISConfiguration.getDefaultRealmName() );
    // look up user (to get email addy, e.g.)
    BPMUser bpmu = bpmauth.lookupUser( userId );
    I do have wf_client_config.xml pointing to the remote server:8888 and the TaskQueryService.authenticate() call works. The getAuthorizationService() call, however, fails with a timeout trying to connect to localhost:9700, which isn't running. I have a little proxy utility which I set up to proxy localhost:9700 to remotehost:8888 and it works as desired.
    So, how can I do to make getAuthorizationService() connect directly to remotehost:8888?
    BTW, getDefaultRealmName() is 'jazn.com' as configured in is_config.xml. The remotehost is using jazn.com for the time being. So, configuring is_config.xml to go to LDAP or OID is not an option right now.
    TIA,
    Mark

    I need to know where this xml files must be located and how to load it. Oracle tutorials are not so clear in most cases and we got lost.
    authenticate is deprecated.
    Edited by: José Carlos on 07/06/2010 08:26
    This is my code:
    WorkflowServicesClientConfigurationType wscct =
    new WorkflowServicesClientConfigurationType();
    List<ServerType> servers = wscct.getServer();
    ServerType server = new ServerType();
    server.setDefault(true);
    server.setName("10.4.20.152");
    servers.add(server);
    RemoteClientType rct = new RemoteClientType();
    rct.setServerURL("t3://10.4.20.152:7001");
    rct.setUserName("weblogic");
    //rct.setPassword(RemoteClientType.Password);
    rct.setInitialContextFactory("weblogic.jndi.WLInitialContextFactory");
    rct.setParticipateInClientTransaction(false);
    server.setRemoteClient(rct);
    IWorkflowServiceClient workflowServiceClient;
    try {
    workflowServiceClient =
    WorkflowServiceClientFactory.getWorkflowServiceClient(WorkflowServiceClientFactory.REMOTE_CLIENT,
    wscct,
    logger2);
    IWorkflowContext wfCtx =
    workflowServiceClient.getTaskQueryService().authenticate( "jcooper", "welcome1", oracle.tip.pc.services.identity.config.ISConfiguration.getDefaultRealmName(), null );
    ITaskQueryService querySvc =
    workflowServiceClient.getTaskQueryService();
    } catch (WorkflowException e) {
    e.printStackTrace();
    } catch (BPMConfigException e) {
    e.printStackTrace();
    Edited by: José Carlos on 07/06/2010 08:38

  • Duplicated exchange protocol message error  on Remote TP implement Sync Res

    I am (MyCompany) send the business message and receive the corresponding business response from remote TP, but got error as the following,
    Error Code     B2B-50081
    Error Description     Machine Info: ( Acme) Description: Duplicated exchange protocol message error - Original B2BMessageId = C0A802111322965DEA30000050D092D0-1
    I need your help!
    Regards,
    San

    Anuj,
    this is message id send to remote TP
    Id     C0A80211132296566E80000050D091E0
    Message Id     C0A80211132296564FA0000050D09120
    Business Message     C0A80211132296566D80000050D09170
    Packed Message     Packed Message
    Payload     Payload
    Protocol Message Id     @C0A80211132296566E10000050D091A0
    Refer To Protocol Message Id     
    Protocol Collaboration Id     @C0A80211132296566E10000050D091A0
    Protocol Transport Binding     SOAPAction="ebXML" http.sync=true timeout=300000 Content-Type=multipart/related;type="text/xml";boundary="----=_Part_65_1555520695.1314954503907";start="<ebxheader-C0A80211132296566E00000050D09190>" Content-Length=2483
    Message Digest     Message Digest
    Digest Algorithm     
    Transport Protocol     HTTP
    Transport Protocol Version     1.1
    And message id received from remote TP
    Id     C0A802111322965DE260000050D09280
    Message Id     C0A802111322965DE260000050D09280
    Business Message     C0A802111322965DEA40000050D092E0
    Packed Message     Packed Message
    Payload     Payload
    Protocol Message Id     M1314954587133.5826024@tcgws02_te4502442803846285853
    Refer To Protocol Message Id     @C0A80211132296566E10000050D091A0
    Protocol Collaboration Id     @C0A80211132296566E10000050D091A0
    Protocol Transport Binding     SOAPAction="ebXML" User-Agent=haboob/5.5.1.0.1 build-2636 Host=xx.xx.xx.xx:xxxx Content-Type=multipart/related; type="text/xml"; boundary="----=_Part_30558_29196552.1314954587139" Connection=close Content-Length=3237 MSG_RECEIVED_TIME=Fri Sep 02 16:08:54 ICT 2011
    Message Digest     Message Digest
    Digest Algorithm     
    Transport Protocol     HTTP
    Transport Protocol Version     1.1
    Thanks for your help.
    San
    Edited by: user7914871 on ๓ ก.ย. ๒๕๕๔, ๑๑:๔๙ น.
    Edited by: 7914871 on ๕ ก.ย. ๒๕๕๔, ๑๔:๑๓ น.

  • BPM Custom Worklist Implementation

    Hi everyone,
    I am working on BPM custom worklist application. I followed the steps to create a sample page with using TaskList task flow as explained in [BPM User's Guide|http://docs.oracle.com/cd/E23943_01/user.1111/e15175/bpmug_ws_taskflows.htm#BACFBHAE]. But when I browse to the sample page that contains TaskList task flow, it just renendered a blank page and the below exception trace is thrown on SOA console. I guess it's coming from security related issue. Does anyone know what the cause of the problem is? Thanks in advance.
    <Aug 15, 2012 1:45:46 AM EDT> <Notice> <Diagnostics> <BEA-320068> <Watch 'UncheckedException' with severity 'Notice' on server 'soa_server1' has triggered at Aug 15, 2012 1:45:46 AM EDT. Notification details:                                                                                                                                                 
    WatchRuleType: Log                                                                                                                                                              
    WatchRule: (SEVERITY = 'Error') AND ((MSGID = 'WL-101020') OR (MSGID = 'WL-101017') OR (MSGID = 'WL-000802') OR (MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802'))                                                                                                                                                                      
    WatchData: DATE = Aug 15, 2012 1:45:46 AM EDT SERVER = soa_server1 MESSAGE = [ServletContext@8620404[app:bpmUI_application1 module:bpmUI-ViewController-context-root path:/bpmUI-ViewController-context-root spec-version:2.5]] Servlet failed with Exception                                                                                                    
    java.lang.NullPointerException                                                                                                                                                  
            at oracle.adfinternal.view.faces.context.RichPhaseListener.afterPhase(RichPhaseListener.java:352)                                                                       
            at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:472)                                                                          
            at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:222)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
            at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
            at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
            at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
            at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
            at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
            at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
            at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
            at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
            at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
            at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
            at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
            at java.security.AccessController.doPrivileged(Native Method)
            at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
            at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
            at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
            at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
            at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
            at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
            at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
            at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
            at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
            at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)Regards,
    K.Hein

    I started to work on my custom worklist client using this explanation: http://download.oracle.com/docs/cd/E15523_01/integration.1111/e10224/bp_worklistcust.htm#CIHDAABE
    I tried the code from Example 28-1 (I'm calling it from main method of a test class) but I'm stuck with this stack trace:
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/j2ee/ws/common/jaxws/ServiceDelegateImpl
         at oracle.bpel.services.workflow.client.WorkflowServiceClientFactory.getWorkflowServiceClient(WorkflowServiceClientFactory.java:144)
         at Execute.main(Execute.java:19)
    Caused by: java.lang.ClassNotFoundException: oracle.j2ee.ws.common.jaxws.ServiceDelegateImpl
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
         ... 2 more
    Web logic and SOA server are up and running.
    I guess there has to be at least some config file but in the link I gave at the beginning I can't find any explanation how to write it.
    Is there any better tutorial or explanation?
    Please help :)

  • Question about worklist  applications

    Hi
    i tried to do the example listed in the Oracle BPEL developers guide ( "Building a Worklist Application Using the Worklist Service APIs" ) and when it comes to these
    step : "Task task = (Task) tasks.get(i);" I get confused because I don't know if this Task is really a oracle.tip.pc.services.hw.task.tasktype.impl.Task.
    Also, I printed the class name
    Object obj= tasks.get(i);
    System.out.println("Class name " + obj.getClass().getName());
    and I got that the value returned was a oracle.tip.pc.services.hw.worklist.WorklistTask
    am I wrong?
    Thanks Nicolas Fonnegra M

    Hi Nicolas
    It's important to note that there is a difference between the local Worklist Service APIs and the Remote Worklist Service APIs.
    The local API is based around oracle.tip.pc.api.worklist.IWorklistService and its implementation oracle.tip.pc.services.hw.worklist.WorklistService.
    The remote API is based around oracle.tip.pc.services.hw.worklist.RemoteWorklistServiceClient.
    The remote API provides only a sub-set of the functionality offered by the local API. It is recommended that you use the local API, unless you have to host your worklist application remotely from the workflow service.
    The local worklist APIs use the class oracle.tip.pc.services.hw.worklist.WorklistTask to represent tasks, which provides more methods than the class oracle.tip.pc.services.hw.task.tasktype.impl.Task used by the remote APIs.
    I suspect that you are using the local worklist API, in which case you should be casting to WorklistTask, not Task.
    Hope this helps
    Regards
    Will Stallard

  • ARGENT:error in java.exe operating server (after updating remote dbase)

    Hello,
    I am getting big trouble in java.exe which is running server program.
    interface : swings
    windows: NT 4.0
    database: MS access97
    jdk 1.3 (jsdk2)
    Dr. watson of NT reporting the error in java.exe(of server) that application error has occured and this is happening every time after i update or write something into the database. Currently i am doing it on localhost m/c.Error: "the instruction at "0x77b3cd19"
    referenced memory at 0x77b3cd19".The memory could be read/"
    //server code
    import java.rmi.*;
    import java.rmi.server.*;
    public class LoginServer {
    public LoginServer() {
    try {
    Login c = new LoginImpl();
    Naming.rebind("login", c);
    } catch (Exception e) {
    System.out.println("Trouble: " + e);
    public static void main(String args[]) {
    new LoginServer();
    //Remote functions implementation
    import java.rmi.*;
    import java.rmi.server.*;
    import java.sql.*;
    public class LoginImpl extends UnicastRemoteObject implements Login
    public LoginImpl() throws RemoteException
    super();
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
    } catch(Exception e) { System.err.print("Exception: ");
    System.err.println(e.getMessage());}
    //register new user take name and password as arguement and creates
    // new user and set status OFF (ie user not logged in)
    public int NewUser(String n,String p) throws RemoteException
    String url = "jdbc:odbc:Authentic";
    int i=2;
    Connection con;
    Statement stmt;
    ResultSet rs;
    try {
    con = DriverManager.getConnection(url, "anything", "anything");
    stmt=con.createStatement();
    rs = stmt.executeQuery("SELECT NAME FROM TAUTHENTIC");
    while (rs.next()) {
    String nam = rs.getString("NAME");
    if((n.equalsIgnoreCase(nam)))
    i=1;
    rs.close();
    stmt.close();
    con.close();
    break;
    f (i==2) {
    stmt.executeUpdate("INSERT INTO TAUTHENTIC "+"VALUES'"+n+"','"+p+"','OFF')");
    i=3;
    rs.close();
    stmt.close();
    con.close();
    } catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    return i;
    //verifying usre and password and then checking status if off turns on else cant verify.
    public int VerifyUser(String s,String p) throws RemoteException
    { int i=0;
    String url="jdbc:odbc:Authentic";
    String status="OFF";
    Connection con;
    Statement stmt;
    ResultSet rs;
    try {
    con = DriverManager.getConnection(url, "anything", "anything");
    stmt=con.createStatement();
    rs = stmt.executeQuery("SELECT NAME, PASSWORD, STATUS FROM AUTHENTIC");
    while (rs.next()) {
    String nam = rs.getString("NAME");
    String pas = rs.getString("PASSWORD");
    String sta=rs.getString("STATUS");
    if((s.equalsIgnoreCase(nam))&&(p.compareTo(pas)==0))
    if(status.compareTo(sta)!=0)
    {i=5; break;}
    if((s.equalsIgnoreCase(nam))&&(p.compareTo(pas)==0)&&(status.compareTo(sta)==0))
    System.out.println("Hi " +nam + " you are in our stock program now");
    i=1;
    break;
    if(i==0)
    System.out.println("Sorry either user dont exist or invalid user name or password");
    rs.close();
    stmt.close();
    con.close();
    } catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    return i;
    //changes status each time user logged in or logged off
    public void cstatus(String name,String status) throws RemoteException
    String url="jdbc:odbc:Authentic";
    Connection con;
    Statement stmt;
    try {
    con = DriverManager.getConnection(url, "anything", "anything");
    stmt=con.createStatement();
    stmt.executeUpdate("UPDATE TAUTHENTIC SET STATUS ='" + status + "' WHERE NAME LIKE '" + name + "'");
    stmt.close();
    con.close();
    catch(Exception ex){ System.out.println("Exception: "+ex.getMessage());}
    i have used swings to call these functions. Updation is happwning but also bringing runtime server application halt.
    //if u need i can mail u my GUI client file from where i am making my RMI connections. my email is [email protected]. Please reply back as soon as possible as i am working on a java project of software agents and have to complete it by this month.
    thanx and bye for now

    Format this mess.
    http://forum.java.sun.com/faq.jsp#format

  • Foreign JMS Server Persistance\Retry in case Remote JMS Provider goes down

    Hi All
    I would need more clarity on this. How does the Foreign JMS Server behave in case the remote JMS provider goes down. Does it take the message from the Publishing Proxy Service and retries\persists the JMS Message till the remote provide is up?
    Please let us know. This would effect our design as retrial is very important here. Thanks

    If you want to provide guaranteed delivery with automatic retries when using remote JMS implementations, there are multiple ways to implement it:
    1. While reading from a foreign JMS destination
    Create a Foreign JMS server using transactional drivers (use XA in case of JMS). The messages remain on remote server JMS queue and OSB proxy polls the message directly on remote server. So if Remote Server is down OSB will not be able to read the message. Once remote server is up OSB will pick up the message (as long as foreign JMS server provides persistence and maintains the messages in the queue during a server restart). In case of error in OSB foreign queue can do retry if it provides a retry mechanism.
    2. While writing the message to a foreign JMS destination
    a. Use a foreign JMS server using transactional connection. Put the retry mechanism in OSB Business service which writes to the foreign JMS/MQ queue. In case of failure Business Service can retry based on configuration. If you want to provide guaranteed delivery then create a local JMS queue to store the messages. So when remote destination is down for a long time undelivered messages will be rolled back to the local queue. You can put retry mechanism on the local queue.
    b. Use a messaging bridge which will write the messages to the remote destination. You can configure retry delivery rules in messaging bridge so once busienss service writes the message to the bridge, a SAF agent will ensure the delivery to remote destination whenever it is up.

  • Remote exporting of a database interface

    I have an interface defining a database layer (all the following code has of course been simplified)
    public interface Database {
      public Collection select() throws Exception;
    }and an implementation class
    public class DatabaseImpl implements Database {
      public Collection select() throws DatabaseException {
    }Now, I wanted to be able to use this remotely as well, so I created an empty remote interface extending the Database interface as well as Remote:
    public interface RemoteDatabase extends Database, Remote {
    }and implement it like this:
    public class RemoteDatabaseImpl extends UnicastRemoteObject implements RemoteDatabase {
      DatabaseImpl databaseImpl;
      public Collection select() throws RemoteException, DatabaseException {
        return databaseImpl.select();
    }On the client side I created a DatabaseProvider which returns a remote or local connection depending on configuration parameters:
    public class DatabaseProvider {
      public Database getDatabase() {
        if (isRemoteConnection())
          return connectRemoteDatabase();
        else
          return connectLocalDatabase();
    }This works like a charm, but the generic "throws Exception" required on all the methods in the Database interface bothers me a lot. Without them I cant do the Remote extension, since that requires "throws RemoteException" on all the methods and I dont want to pollute the Database and DatabaseImpl classes with RemoteExceptions, so the generic Exception throws clause seems like the only solution. Optimally I would have liked the Database interface methods to simply throw DatabaseExceptions, such as RecordNotFoundException. I've spent quite a lot of time wrestling with this but haven't been able to come up with a "cleaner" implementation. So, I wonder if there is anyone here who could give me any pointers or suggestions on how to do this differently.
    With thanks in advance,
    Darri

    You would normally do this by having two implementations of the Database interface - one which accesses the database locally and one which access the database remotely. (This is equivalent to your 'if' statement - I always try and avoid conditional logic where possible).
    To get around the exception issue, you could wrap your remote implementation (which implements DatabaseRemote) with a wrapper which only implements Database. This wrapper could delegate all calls to the remote implementation and then decide how to deal with the RemoteExceptions that come back according to some (possibly pluggable) policy. Typically, you might retry select operations a few times before giving up. When you give up, you simply wrap your RemoteException inside a new DatabaseException and re-throw it.
    Like this:
    public class LocalDatabase implements Database {
        public Collection select() throws DatabaseException {
            try {
                jdbc.select(blah);
            } catch (SQLException e) {
                throw new DatabaseException(e);  // or whatever
    public class RemoteDatabase implements (err...) RemoteDatabase {   // you see what I mean here!
        public Collection select() throws DatabaseException, RemoteException {
            remote.select(blah);
    public class LocalRemoteDatabaseWrapper implements Database {
        public LocalRemoteDatabaseWrapper(RemoteDatabase remote) {
            this.remote = remote;
        public Collection select() throws DatabaseException {
            int retry = 3;
            while (true) {
                try {
                    remote.select(blah);
                    return results;
                } catch (RemoteException e) {
                    if (retry-- == 0) {
                        throw new DatabaseException(e);
    }

  • Jmx remote 1.0.1_04 source?

    Does anywhere know where I can download the source for the JMX Remote reference implementation version 1.0.1_04?
    The binaries can be found at the link below, as well as the source for all versions except the most recent (1.0.1_04)!
    http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/download.jsp

    Hi!
    This problem persists and now it's even worse as none of the SOURCE DOWNLOAD links to the actual source code.
    I'm in a bit of a hurry, so I'd even appreciate if you can mail me the source code directly.
    Regards,
    Jimisola

  • How to give Remote Login permission for hw_services in BPEL

    Hi,
    We are using the Oracle SOA suite 10.1.3.1. May I know how to give the Remote login permission for hw_services which is deployed in BPEL manager. After changing to OID we are unable to call the remote worklist api using REMOTE_CLIENT. It throws the error Not Authorised to login .
    Thanks,
    -

    Hi Fresh,
    You have design the solution using Data replication functionality with WFSC. Probable solution could be as seen below
    Refer below link for information on the solution
    http://download.microsoft.com/download/3/6/1/36117F2E-499F-42D7-9ADD-A838E9E0C197/SiteRecoveryWhitepaper_final_120309.pdf
    Regards,
    Deepak Kori.

  • Implementing RMI - some thoughts

    These thoughts apply in particular to implementation on Windows, but could also apply to other platforms as well.
    The key to any successful RMI implementation is the Security Policy, pointed to by the System property java.security.policy. If this is not absolutely spot on, you will tear your hair out for ages, wondering what on earth is going on.
    The second key to implementing RMI successfully, is to recognize that your remote code must try to contain no code which would throw a RunTimeException - e.g. avoid calling methods on null objects. This is not so important in straightforward RMI (i.e. using a Remote object or objects, none of which are Activatable), because the Server running on the remote machine is constantly connected to the terminal (unless it's running as a Daemon Thread) and should churn out the RunTimeException stacktraces, but in Activatable RMI, it's essential, because a RunTimeException will cause the remotely-activated JVM to hang. You can get a clue as to what is going on by asking the RMI Daemon (RMID) to output child JVM log calls by passing it the following parameter:
    -C-Djava.rmi.server.logCalls=true
    the -C tells it to pass this property to the Child JVM created by RMID (if necessary).
    The security policy is specified by using
    -Djava.security.policy=file URL
    Note this is NOT a standard URL, in the sense that everything past the file:/// is sent to the Operating System dealing with it. It's a UNIX format URL. This means that Drive letters (as you would type in Windows) are ignored.
    so, if the Drive on which the Server, and/or RMID was started was, say, C:
    then passing
    -Djava.security.policy=file:///A:/myDirectory/MySecurityPolicy.txt
    will be interpreted as
    file:/myDirectory/MySecurityPolicy.txt
    This is fine if you happen to have a filepath on Drive C: called myDirectory/MySecurityPolicy.txt and that file contains the policy you want. But if it doesn't, the RMI will take the default security policy (usually in .../jre/lib/security/java.policy and subsequently appended by your own user policy (on Windows this is C:/WINDOWS/.java.policy) and you will get all sorts of truly wonderful access exceptions.
    Note that the codebase URL (-Djava.rmi.server.codebase=file:///A:/MyClasses/ ) works just fine and will find your classes on drive A: no problem.
    Note also, that file:///A:/directory/file.file is a perfectly valid URL, so this is probably a bug in the System Properties parsing inside Java itself.
    If you start a separate JVM (under the RMI Activator RMID) you need to make sure it is started with java.security.policy and java.rmi.server.codebase set to the same URLs you used when starting up the Server. In other words if you started the server with:-
    java -Djava.security.policy=URL1 -Djava.rmi.server.codebase=URL2 -jar MyServerStartup.jar
    then RMID must pass these properties to each and every child JVM it starts.
    I have found this does not happen by using Property overrides, so if this is the case with you, you can do one of 2 things:-
    1) create a CommandEnvironment inner class on the ActivationGroupDesc and pass it a String array containing these 2 property setters, or
    2) tell RMID to do this with
    -C-Djava.security.policy=URL1 -C-Djava.rmi.server.codebase=URL2
    What you must do now (so Sun recommends), is to start RMID passing the security policy file property to it, like this:-
    RMID -J-Djava.security.policy=file:///MyDirectory/MySecurityPolicy.txt
    so, a fully specified RMID command would be
    RMID -J-Djava.security.policy=file:///MyDirectory/MySecurityPolicy.txt -C-Djava.security.policy=URL1 -C-Djava.rmi.server.codebase=URL2
    this is all one line!
    I hope these notes help someone out there and have been spurred on by my own trial and error experiences in successfully implementing RMI Activation on Windows.

    Can't agree with much of this.
    1. Any RuntimeException thrown by a remote method implementation is caught by RMI and reported to the client as a RuntimeException (ServerRuntimeException in JDK 1.1). Activation JVMs can hang like any other JVM but this is probably not the cause. RTEs thrown by other non-RMI threads cause the thread to exit with a stack trace as usual, which might hang your server, so any such thread should catch RTEs in its 'run' method.
    2. The output of acticvation JVMs is connected to the same stdin/stdout (Win=command window) as 'rmid', and can be viewed.
    3. The java.security.policy setting is a generic URL, not specifically a file: URL, and certainly not a 'Unix file URL'. I've never encountered the alleged problem with ignored drive letters. If you leave out the file:/// part it looks in the current directory, maybe that was your problem?
    4. Setting property overrrides in an ActivationGroupDesc does indeed work provided that rmid's security policy allows write access to those properties.
    EJP
    http://www.rmiproxy.com/javarmi

  • Urgent Help Required For Starting RMI server from servlet.

    I am currently working on rmi project.
    I want to send request to remote machine(Web host) where my application is from desktop client .For that we are using RMI.
    I am writing servlet and inside it i am binding object to registry for rmi server.
    which will be deployed on remote server.
    code ....
    Registry reg;
    reg=LocateRegistry.createRegistry(1099);
    Server server=new Server("server");//class whose remote object to be accessed
    //extends unicast remote object.Implement ServerInt interface which extends Remote.
    reg.bind("server",server);
    When i am trying to access this object i am getting following exception.
    javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalExcepti
    on: error unmarshalling return; nested exception is:
            java.lang.ClassNotFoundException: ServerModule.ServerInt]
    at com.sun.jndi.rmi.registry.RegistryContext.lookup(Unknown Source)
    at com.sun.jndi.toolkit.url.GenericURLContext.lookup(Unknown Source)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at RequstReplication.main(RequstReplication.java:27)
    Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested excep
    tion is:
    java.lang.ClassNotFoundException: ServerModule.ServerInt
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    ... 4 more
    Caused by: java.lang.ClassNotFoundException: ServerModule.ServerInt
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at sun.rmi.server.LoaderHandler.loadProxyInterfaces(Unknown Source)
    at sun.rmi.server.LoaderHandler.loadProxyClass(Unknown Source)
    at sun.rmi.server.LoaderHandler.loadProxyClass(Unknown Source)
    at java.rmi.server.RMIClassLoader$2.loadProxyClass(Unknown Source)
    at java.rmi.server.RMIClassLoader.loadProxyClass(Unknown Source)
    at sun.rmi.server.MarshalInputStream.resolveProxyClass(Unknown Source)
    at java.io.ObjectInputStream.readProxyDesc(Unknown Source)
    at java.io.ObjectInputStream.readClassDesc(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    ... 5 more
    I can access naming enumeration of registry and object bound to it.
    by following program.I shows corect objects.
    Context namingContext=new InitialContext();
    NamingEnumeration<NameClassPair> e=namingContext.list("rmi:");
    while(e.hasMore())
    System.out.println(e.next().getName());
    While when i start RMI server from simple java program i can access these objects from registry.
    I am not getting what is problem problem.Is there any other way to send request?
    Plese give quick response.

    I am currently working on rmi project.
    I want to send request to remote machine(Web host) where my application is from desktop client .For that we are using RMI.
    I am writing servlet and inside it i am binding object to registry for rmi server.
    which will be deployed on remote server.
    code ....
    Registry reg;
    reg=LocateRegistry.createRegistry(1099);
    Server server=new Server("server");//class whose remote object to be accessed
    //extends unicast remote object.Implement ServerInt interface which extends Remote.
    reg.bind("server",server);
    When i am trying to access this object i am getting following exception.
    javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalExcepti
    on: error unmarshalling return; nested exception is:
            java.lang.ClassNotFoundException: ServerModule.ServerInt]
    at com.sun.jndi.rmi.registry.RegistryContext.lookup(Unknown Source)
    at com.sun.jndi.toolkit.url.GenericURLContext.lookup(Unknown Source)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at RequstReplication.main(RequstReplication.java:27)
    Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested excep
    tion is:
    java.lang.ClassNotFoundException: ServerModule.ServerInt
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    ... 4 more
    Caused by: java.lang.ClassNotFoundException: ServerModule.ServerInt
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at sun.rmi.server.LoaderHandler.loadProxyInterfaces(Unknown Source)
    at sun.rmi.server.LoaderHandler.loadProxyClass(Unknown Source)
    at sun.rmi.server.LoaderHandler.loadProxyClass(Unknown Source)
    at java.rmi.server.RMIClassLoader$2.loadProxyClass(Unknown Source)
    at java.rmi.server.RMIClassLoader.loadProxyClass(Unknown Source)
    at sun.rmi.server.MarshalInputStream.resolveProxyClass(Unknown Source)
    at java.io.ObjectInputStream.readProxyDesc(Unknown Source)
    at java.io.ObjectInputStream.readClassDesc(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    ... 5 more
    I can access naming enumeration of registry and object bound to it.
    by following program.I shows corect objects.
    Context namingContext=new InitialContext();
    NamingEnumeration<NameClassPair> e=namingContext.list("rmi:");
    while(e.hasMore())
    System.out.println(e.next().getName());
    While when i start RMI server from simple java program i can access these objects from registry.
    I am not getting what is problem problem.Is there any other way to send request?
    Plese give quick response.

Maybe you are looking for

  • Back Up During Firmware 2.1 Update

    I've been trying to update my iPhone using iTunes 8, but there seems to be some kind of Zeno's paradox at work, because the further it gets along in the back up process, the slower it seems to be going. I left it running last night, and came back thi

  • Missing Excel Macro - Didn't save as .xlsm

    So I realized that I didn't save my file as a macro-enabled workbook before I closed it, and now my macro is completely gone.  I haven't shut down the computer since then, and I was wondering if it was still in my computer in a temporary folder somew

  • Process does not end when binding a object to registry

    I am writing a Unit Test case in which i need to create a datasource and bind it to RMI registry so that the methods i need to test can get a database connection . The problem is that after the test cases have finished running the process does not en

  • Display an extra column in the standrad report using LDB

    my requirement is like this 1) to add one more parameter  region in the selection screen of  VI98 2) Display the region column in the output in the 3rd position is there any way to add one more parameter in the selection screen of transaction VI98 an

  • How to set Borderlayout?

    Hi all, I used BorderLayout in JPanel. I have added JTextArea at CENTER and JList at EAST. Jpanel is in JFrame. The size of JList is depend on Element that longest but when I remove all element and try to resize JFrame, the JList which has no element