Creating custom protocol handler

Hi all java's guru I hope that you guys can help me. I,ve been trying to develop custom protocol handler that handles this kind of url:
jdbc://driver_type/database_url/statement
I have override the URLConnection class but i get confused where to set the input stream and output stream.
Your guys help will be really appreciated.
Thanks in advance

Well I've been busy implementing Thinkfree
application server(online office applet). I have
succeeded implementing webdav protocol(it's not that
difficult since webdav works also via http) Now I'm
trying to develop custom file object that getting his
inputstream and outputstream from and into the
database. Because database connection in java only
possible via jdbc so I have to write my own
URLStreamHandler and URLConnection class. Does
anybody has experience in developing a custom
protocol handler? any advice will be appreciatedAre you aware that the actual protocol used for communication to a database is totally proprietary? As in it depends on the database?
Could you describe how you think this will work exactly? Because you can't just write a one-size fits all solution here. It just does not exist. And I am not too sure what you mean by the input and output streams from and into the database mean.

Similar Messages

  • Custom Protocol Handler  in WL6.0

    Hi
    I wrote my own url protcol handler for retrieving data with custom URLs.
    It works fine in a client application, but when my custom URLs are invoked
    in EJB code running inside WL6, the URL is not recognized : I get a
    MalformedURLException.
    Note that I added a debug statement that checks the value of the system
    property java.protocol.handler.pkgs
    and my package is correctly listed there after many weblogic packages.
    has anyone ever been able to use a custom protocol handler inside WL6 ?
    regards,
    Edo

    Hi,
    First, I want to know what kind of Windows do you use? If it is a Windows server system, there might be a security setting that prevents this, you can try to turn it off in this way:
     Open the Server Manager, then select IE ESC,
     Turn off the Internet Explorer Enhanced security configuration both for administrator and        users in the way as the screenshot below:
    If you are using a Windows client system, try to add the local address to the local intranet security setting in this way:
    Open Internet Explorer, then select Internet option, click “security” item.
    Select Local Intranet then click “sites”, then click “advanced”.
    Add the local sites as the screenshot below:
    Wade Liu
    TechNet Community Support

  • My custom protocol handler isn't working after upgrading from 3.0

    Redhat Enterprise Linux 4
    Firefox 3.6.7. Updated via RedHat Network.
    I'm trying to add a custom protocol handler (gdc) to Firefox. This worked in 3.0 and earlier. Now I'm getting "Firefox doesn't know how to open this address, because the protocol (gdc) isn't associated with any program." errors.
    Tried adding network.protocol-handler.app.gdc string with valid path. Didn't work. Went to #firefox irc.mozilla.org and was recommended that I add network.protocol-handler.expose.gdc and set it to false. I still get the error.

    Hi There,
    Yep I can confirm that I am having problems with wifi as well.
    My problem is that it is not re-joining known networks.
    Also the auto login feature designed for hotspots does not seem to work well either. The Log In Screen slides up then an error keeps repeating on the page...."Error Opening Page - The page could not be opened because an error occurred"

  • Custom protocol handler for Server and Client

    Hi there,
    I have been reading about "A New Era for Java Protocol Handlers" from http://java.sun.com/developer/onlineTraining/protocolhandlers/ . I would like to redesign my existing codes to suit this architecture.
    The article mentioned about write client side application. I am wondering whether it will be possible to use the same architecture for server side as well ?
    If it is possible, it will be the very kind of you all to guide me to the right direction. Thank you in advance.

    Thanks for your input. Yeah, the article has been there for quite sometimes. That's why I am a bit sceptical about using it. The strange thing is that there has not been any updates about this topic since then (searched in google and not many web pages are mentioning this thing). I am wondering whether it is a good choice to change the code or not.

  • Protocol handler in WL6sp1

    Hi,
    We've written our own url protocol handler for retrieving data with
    custom URLs. It works fine in a client application using:
    new java.net.URL("protocol://host:port/blah/blah.xml"); //1
    and in EJB code using
    new java.net.URL(null, "protocol://host:port/blah/blah.xsl", _handler);
    //2
    but when my custom URLs are invoked in EJB code running inside
    WL6 without specifying a Handler (like //1, which is how I need to use
    them),
    the URL is not recognized : I get a MalformedURLException.
    Note that I added a debug statement that checks the value of the
    system property java.protocol.handler.pkgs and my package is
    correctly listed there after many weblogic packages.
    has anyone ever been able to use a custom protocol handler inside WL6 ?
    thanks,
    Steve

    This is the WLE section (the C/C++ product), not WLS (the Java product).
    Try reposting -- maybe in the Servlet or Misc section.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com
    +1.617.623.5782
    WebLogic Consulting Available
    "steve liles" <[email protected]> wrote in message
    news:3aed3039$[email protected]..
    Hi,
    We've written our own url protocol handler for retrieving data with
    custom URLs. It works fine in a client application using:
    new java.net.URL("protocol://host:port/blah/blah.xml"); //1
    and in EJB code using
    new java.net.URL(null, "protocol://host:port/blah/blah.xsl", _handler);
    //2
    but when my custom URLs are invoked in EJB code running inside
    WL6 without specifying a Handler (like //1, which is how I need to use
    them), the URL is not recognized : I get a MalformedURLException.
    Note that I added a debug statement that checks the value of the
    system property java.protocol.handler.pkgs and my package is
    correctly listed there after many weblogic packages.
    has anyone ever been able to use a custom protocol handler inside WL6 ?
    thanks,
    Steve

  • Creating Custom Validators for ADF in JDev 10.1.3.1

    Hi all,
    I'm trying to create a validator to solve a seemingly common problem - that is given 2 dates (startDate & endDate), validate that endDate cannot be earlier than startDate.
    In my case, both startDate and endDate are in the same form. From the ADF Developers Guide, the recommended approach is to create the validation method on the page's backing bean. But in my application, there are many occurrences of startDate and endDate in other forms, therefore having the validation method on the backing bean might not be the best solution.
    I tried to create my own custom validator and tying it to a tag library stated in http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSFDevelop6.html#wp999130, but that didn't seem to work either. I'm not sure if creating custom validators by extending the ValidatorTag is supported in ADF.
    Would appreciate it if someone has any suggestions on how to create the validator that I need, without having validation methods that does the same thing all over my backing beans.
    TIA.
    Regards,
    Lennard

    Hi,
    of course, ADF Faces supports custom validators because it is compliant to the JSF APIs runnting on the JSF RI.
    Another approach for validation would be on the business service level. Assuming you use ADF BC, the EO can have a method validator defined that is automatically inherited by all its views. The disadvantage though is that the error message would have to come from the server, requiring custom error message handling for user friendly messages as described in the developer guide.
    Looking forward, in a next release of ADF the binding ayer will allow more complex validations thus not requiring to handle complex validation on teh business service.
    So far however I think that using a custom validator is the best you can do. Note that in the case of ADF BC the date is of type oracle.jbo.server.domain.Date and not java.util.Date, which might be a hint to check for your validator issue
    Frank

  • File, Send link doesn't open a new email. Using Firefox 11.0. Outlook 2010 is the Mailto default and W7 default email program. On the About:config page network.protocol-handler.external.mailto is set to regular font (not bold) "default Boolean true".

    File, Send link doesn’t open a new email. Running Firefox 11.0. Outlook 2010 is the Mailto default and the W7 default email program. On the About:config page, network.protocol-handler.external.mailto is set to regular font (not bold) “default Boolean true”.

    I assume you have tried toggling the setting in Firefox between Outlook and, say, Gmail:
    orange Firefox button ''or'' classic Tools menu > Options > Applications
    In the search box, type or paste '''mailto''' and pause for the list to filter.
    Change the setting and OK to save it, then return to the dialog, change back, and OK again.
    You also might want to toggle the setting at the OS level between Microsoft Outlook and the native Windows Mail client in a similar fashion. In Windows XP you could use IE's Options dialog, Programs tab, for this, but I'm not sure in Windows 7.
    Since one possibility is a problem in your Firefox settings (including the possibility of interfering add-ons), and another is a problem at the Windows level (e.g., Registry settings), it would be useful to try to identify which one it is. One quick way to distinguish is to create a new Firefox profile. It will start up with all factory settings. You can switch back to your existing profile after testing.
    First, I recommend backing up your Firefox settings in case something goes wrong. See [https://support.mozilla.com/en-US/kb/Backing+up+your+information Backing up your information]. (You can copy your entire Firefox profile folder somewhere outside of the Mozilla folder.)
    After closing Firefox, start up again in the Profile Manager as described in this article: [http://support.mozilla.com/kb/Managing+profiles Managing profiles].
    With the new profile, can Firefox successfully create a message in Outlook?

  • Create Customer at POS and upload to different company code

    Hi Experts
    Client Requirement is like this
    Two company codes are here e.g. company code BP01 and BP02
    BP01 has one store
    BP02  has three store
    Now Customer is create at POS Server at any store .
    here we can create customer with respect to any one company code
    Same customer want to  buy goods from both company code and can get rewards points
    question
    so cutomer has to extend in other company code and has to update to each POS SERVER which located in each store 
    how to handle this scenarion
    regards

    Hi Hanumant,
    Assuming if customer, buys some item from CCode BP02 regularly, then you can create the customer on the POS application (like SAP POS..), and append the POS Customer master (re-use any text field) with information of other company code where the customer wishes to deal with).
    The customer master will be passed using inbound idoc, on to the IS Retail Server in the HO.
    Now at HO level a the customer can be extended for multiple company code ..in this case BP01 manually or by an automated program, which will monitor the specific field (coming from the new customer master idoc from POS) , if it detects contents, it reads the same and extend the customer as per mentioned ccode.
    So next time onwards , using outbound doc , customer master can be updated to all locations for that customer. Similarly the loyality point, can be accumulated based on the purchases made per Ccode.
    Regards,
    Anirban Roy

  • Cannot create process to handle workflow instance conversation

    <Nov 18, 2002 1:04:30 PM IST> <Error> <B2B> <000000> <<Process>
    Hi,
    Iam getting following error when iam trying to invoke
    subworkflow.
    can anyone help me in solving this problem.
    regards
    Ananth
    ERROR: Cannot cr
    eate process null.>
    <Nov 18, 2002 1:04:30 PM IST> <Error> <B2B> <000000> <<B2B-BPM-Plugin> ERROR:
    Cannot create process to handle workflow instance conversation
    com.bea.b2b.protocol.ProcessManager$CreateException: ERROR: Cannot create proces
    s null.

    Hi Ajaz,
    Error description is not detailed enough to provide the solution. You need to post the error message what you got in the server log files. This should contain specific details about the issue.
    Not sure but issue may be related to JVM settings. if it is so, server log file will provide the error description.

  • ADF Custom error handler not working.

    Hi All,
    i am using jdev version 11.1.1.5.0. i have created one custom error handler class in model layer which extend DcErrorHandlerImpl class.
    and do the entry in Databinding.cpx file
    *<Application ErrorHandlerClass="mypackage.classname"/>*
    i have override getDisplayMessage(BindingContext ctx, Exception ex) method to show SQL Exception which comes from database table trigger.
    code is following-
    package com.in.jagran.view.services;
        import java.sql.SQLException;
        import oracle.adf.model.BindingContext;
        import oracle.adf.model.binding.DCErrorHandlerImpl;
        import oracle.jbo.JboException;
        public class AclasErrorHandler extends DCErrorHandlerImpl {
          public AclasErrorHandler(boolean setToThrow) {
            super(setToThrow);
            System.out.println("Inside Error Handler class");
          public AclasErrorHandler() {
              super(true);
           // this(true);
           * Returns the message that will be reported to JSF for each error that occurs.
           * Returning "null" is the way the custom error handler signals that a given exception
           * should not be reported to the client.
          @Override
          public String getDisplayMessage(BindingContext ctx, Exception ex)
            if (ex instanceof oracle.jbo.ValidationException) {
              return super.getDisplayMessage(ctx, ex);
            else {
              // Extract and return the error message that has to be displayed
              Exception exception = ex;
              String message = "";
              // If this exception is an instance of JboException,
              // try to find the cause by recursing over the eventual causing exceptions
              if (exception instanceof JboException)
                Throwable[] exceptionList = ((JboException)exception).getExceptions();
                while (exception instanceof JboException
                        && exceptionList != null && exceptionList.length > 0)
                  exception = (Exception)exceptionList[0];
                  if (exception instanceof JboException) {
                    exceptionList = ((JboException)exception).getExceptions();
              // *** Special processing of SQLExceptions
              if (exception instanceof SQLException) {
                message = exception.getMessage();
                // Ignore the lines in the error message that indicate the line number in the PLSQL code that the error resulted on.
                int ind = message.indexOf("ORA-06512");
                if (ind > 0)
                  message = message.substring(0, ind);
              // *** If the the reason for the JboException was data creation exception then display the message
              // of the top JboException (i.e. JBO-*****: Invalid numeric value, date format or time format)
              else if (exception instanceof NumberFormatException || exception instanceof IllegalArgumentException) {
                // Report the top exception
                message = ex.getMessage();
              // Otherwise report the message of the lowest exception in the hierarchy
              else {
                message = exception.getMessage();
              return message;
        }but it is not working for me.
    thanks in Advance.

    yes i have used dubugger.
    i have set break point to following line-
    return super.getDisplayMessage(ctx, ex);
    if (ex instanceof oracle.jbo.ValidationException) {
            return super.getDisplayMessage(ctx, ex);   
    }when atttribute validation done like i have attribute of type number and i have done the validation "must be greater than 0" now when i have given negative value control go to above line.
    and i have added following code also in handler class
            @Override
               public void reportException(DCBindingContainer dCBindingContainer,
                                           Exception exception) {
    System.out.println(exception.getMessage());
                       super.reportException(dCBindingContainer, exception);
                   }now when i have done commit operation control go to here and println statement print follwoing error on log window.
    JBO-26041: Failed to post data to database during "Rollback to Savepoint": SQL Statement "null".

  • Custom View Handler

    I am creating a custom view handler , but I want that this view is used only for specific files(views) and for all other files I want that default handler to be used , can we do this in JSF ??If yes then how ??

    In your createView method of custom view handler, One of your parameter represents viewName. I guess you can inspect the viewName and delegate the method calls the appropriate implementation. You may also use a resource bundle in conjuction with this.
    This strategy depends on the enhancements that you wish to do in your custom implementation.
    I have never tried this before but dont you think its possible in your case?

  • How to create custom calendar in webdynpro ABAP.....(WDA)

    Hi,
    How to create custom calendar in Webdynpro Abap ?.
    Regards,
    Narasimha

    The best way I see here is to develop your custom calender in any of the UI technologies supported like Flash (flex) or HTML5 (or maybe even SilverLight? not sure) and embed it in your WD view. You can also handle interactions between the embedded component and the WD controller.
    Regards,
    Raghavendra

  • Missing performance counters when creating custom dashboard?

     I've run into an issue when trying to create custom dashboards with performance views. 
    For example I have 2 servers with the same OS 2008 R2 one does not show the problem the other does. 
    The issue is that when I go in to create a custom dashboard and add a performance view the only counters listed for the problem server are network adapters. If I go to performance view on the server in scom it shows all the counters. The only place the counters
    are missing is in the selection area for the dashboard performance view widget. 
      Do the performance views pull counter data from a different place then the dashboard performance widgets?

    Hi,
    Here are two articles regarding to event 31552, you may check it:
    The 31552 event, or “why is my data warehouse server consuming so much CPU?”
    http://blogs.technet.com/b/kevinholman/archive/2010/08/30/the-31552-event-or-why-is-my-data-warehouse-server-consuming-so-much-cpu.aspx
    My Experience Handling Event ID: 31551 and 31552 issue
    http://donald-scom.blogspot.com/2013/09/my-experience-handling-event-id-31552.html
    Regards,
    Yan Li
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How to set up a label control from custom event handler?

    Hi,
    Below I try to describe my problem:
    I have a single instance of MyClass (I use Cairngorm framework), with ArrayCollection as a variable, in which I would like to keep a couple addresses from database.
    Additionaly  I created a custom components with a list of people retrieved from database, with eventhandler  for a doubleclick event. After I doubleclick on some person, I create a custom event and dispatch it. In command class connected with this event I connect to the database and get full data about this person and a set of her addresses. This set of addresses I placed into ArrayCollection in my model variable. And now I have a problem, because one of this address (the birth place) I would like to display below the list with persons, in a Panel with a couple of label control, but .... I can't to bind label control to my model.addresses[???] because I don't know if this doubleclicked person has this birth address at all?
    I wonder if it is possible to set up label control in my custom components in time when I'm receiving the data from database in my custom event handler???
    One of the way to achieve this is to define a string var in my model and placed this special address in it, and then the label control to this variable, for instance {model.birthplace}, but this is only needed for a moment, I don't want to keep this address in extra variable in model, because I have already it in my ArrayCollection in model, so it would be a duplicate.
    I hope that you could understand me and my english :-)
    Best regards

    Looks like I migh not be a novice swing programmer for long then.

  • Custom Error handling in DataSheet View with pop-up message or label controls or HTML

    I have a requirement in which DataSheet view is used to bulk edit or input list items and handle validations while in the process.
    We have validations done in event recievers before creating the list item. But could not provide a pop up or message with summary of all validation errors. these are buiness custom validations.
    Is there a way to custom error handle datasheet view? Is there a way to invoke a UI in context from event recievers?

    I have a requirement in which DataSheet view is used to bulk edit or input list items and handle validations while in the process.
    We have validations done in event recievers before creating the list item. But could not provide a pop up or message with summary of all validation errors. these are buiness custom validations.
    Is there a way to custom error handle datasheet view? Is there a way to invoke a UI in context from event recievers?

Maybe you are looking for

  • TV@ Plus, what video capture settings to use?

     I have a TV@ Plus and am unsure what video capture settings to use. I've had it for several months and solved my audio problems and need to know what Video Input Format, Capture Format (Profile), Capture - Size, Quality, Bit Rate and Audio Format se

  • Oracle 8i communicate with oracle 9i

    I'm planning to do data purging which transfer some old data in date range from oracle 8i to oracle 9i and then delete the old in oracle 8i. as i know, to communicate between database in same server, we need to use "Database Link" but if communicate

  • Down payment - Final Billing (F2) has value zero

    Dear SD Gurus, For down payment, I have set up the necessary steps with ref to SAP help file. 1. Condition type AZWR in the pricing procedure with requirement as 2 (item with pricing) and the calculation formula 48 2. Copy control set up for Order ty

  • How can I set the desktop image for client computers?

    How can I set the desktop image for client computers using ARD or terminal?

  • Itunes wont disable disk usage

    Ok so heres the deal: I just upgraded to a new desktop that runs under windows vista and thought that moving my old library to this new computer would be a snap. I checked out this site for directions on using my 30g classic as a hard drive to make t