About collecting java and JVM-System

Hi all,
I'm trying to collect from a java application (jvm is 1.6). When I see the exclusive time per function I get most of the time assigned to <JVM-System>. My questions are:
1. what jvm activites get mapped to this? gc? jitting?
2. any way to get finer granularity in this jvm activity?
many thanks in advance,
fdo

Sorry, this was a self inflected RTFM ;)
http://docs.sun.com/app/docs/doc/819-5264/6n7c1asni?a=view#afaoj

Similar Messages

  • Error when accessing Java and JVM section

    I'm getting the following error when accessing the Java and
    JVM section of the CF Administrator:
    "Element JDKPATH is undefined in FORM"
    I've searched a lot and there's very little on the topic. On
    this forum there are two posts and one got no answer, on the other
    it was suggested it might be the jvm.config file. I've looked at
    mine but I really have no idea what could be wrong. Also, there are
    two jvm.config files in my install, one in jrun4/bin and another in
    jrun4/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/runtime/bin
    folder (I did multiserver installation).
    I've already tried a bunch of things and no luck, any help is
    appreciated on this.

    quote:
    Originally posted by:
    ke4pym
    What is your path? Make sure you're using forward slashes.
    ie: d:/java/jdk1.6.0_12/bin/blah/blah/blah
    What path are your referring to? My actual PATH environment
    variable? Or are you referring to something else. Btw, here's what
    my config file looks like right now.
    # VM configuration
    # Where to find JVM, if {java.home}/jre exists then that JVM
    is used
    # if not then it must be the path to the JRE itself
    java.home=C:/JRun4/jre
    # If no java.home is specified a VM is located by looking in
    these places in this
    # order:
    # 1) bin directory for java.dll (windows) or
    lib/<ARCH>/libjava.so (unix)
    # 2) ../jre
    # 3) registry (windows only)
    # 4) JAVA_HOME env var plus jre (ie $JAVA_HOME/jre)
    # Arguments to VM
    java.args=-server -Xmx512m -Dsun.io.useCanonCaches=false
    -XX:MaxPermSize=192m -XX:+UseParallelGC
    -Dcoldfusion.rootDir={application.home}/
    # commas will be converted to platform specific separator and
    the result will be passed
    # as -Djava.ext.dirs= to the VM
    java.ext.dirs={jre.home}/lib/ext
    # where to find shared libraries
    java.library.path={application.home}/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusi on/lib,{application.home}/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/jintegra /bin,{application.home}/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/jintegra/b in/international
    system.path.first=false
    # set the current working directory - useful for Windows to
    control
    # the default search path used when loading DLLs since it
    comes
    # before system directory, windows directory and PATH
    java.user.dir={application.home}/../lib
    # JVM classpath
    java.class.path={application.home}/servers/lib,{application.home}/lib

  • Can someone pleas tell me about abap, java and xslt mappings

    Hi,
    can someone please tell me about abap, java and xslt mappings.
    Thanks,
    Bernard.

    HI,
    JAVA mapping
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii /people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping /people/amol.joshi2/blog/2006/03/10/think-objects-when-creating-java-mappings /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping sample code for java mapping blog=/pub/wlg/4143 tutorial sax and dom
    ABAP mapping
    ABAP mappings run on ABAP Stack and are developed in the ABAP workbench of the Integration Server.
    You normally do not need to use the ABAP mappings and is preferable for someone with ABAP programming background. I should say JAVA functions would suffice any complex scenarios.
    refer step by step guides for ABAP Mapping
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    ABAP Mapping
    /people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs
    https://websmp101.sap-ag.de/~sapdownload/011000358700003082332004E/HowToABAPMapping.pdf
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
    /people/r.eijpe/blog
    ABAP Mapping Vs Java Mapping.
    Re: Message Mapping of type ABAP Class not being shown
    Re: Performance of mappings (JAVA, XSLT, ABAP)
    XSLT Mapping
    XSLT stands for EXtensible Stylesheet Language Transformations. It is an XML based language for transforming XML documents into any other formats suitable for browser to display, on the basis of set of well-defined rules.
    /people/sap.user72/blog/2005/03/15/using-xslt-mapping-in-a-ccbpm-scenario
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/006aa890-0201-0010-1eb1-afc5cbae3f15
    /people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=xslt+mapping&adv=false&sortby=cm_rnd_rankvalue#
    Steps required for developing XSLT Mapping
    u2022 Create a source data type and a target data type
    u2022 Create Message types for the source and target data types.
    u2022 Create Message Interfaces includes Inbound Message interface and Outbound Message interface.
    u2022 XSLT Mapping does not require creation of Message mapping, so donu2019t create any Message mapping.
    u2022 Create an .XSL file which converts source data type into target data type.
    u2022 Zip that .xsl file and import it into Integration Repository under Imported Archives.
    u2022 In Interface Mapping choose mapping program as XSL and specify this zip program. (Through search help you will get XSL Mapping programs that you imported under Imported Archives, select your corresponding XSL Program)
    u2022 Test this mapping program by navigating to Test tab.
    By having look at above steps you can easily find out that this mapping is no where different from other mapping programs, here the challenging lies in creating an XSLT file. If you spend couple of minutes in studying XPATH tutorial you would be in ideal position to create an XSL Transformation (.xsl extension).
    If you still find difficulties in generating XSL Transformation, then you can make use of a tool u201CAltova MapForceu201D which will create XSL file for you.
    Steps for creating XSL file using this tool:
    1. Open the Alto MapForce, import the source .xml and .xsd file in it
    2. Similarly import the target .xml and .xsd in MapForce.
    3. These two data files should match with source and target data types in Integration Repository.
    4. Complete the graphical mapping using extensive list of XSLT functions available there.
    5. Save the mapping file.
    6. Click the XSLT tab. You will have the entire xslt logic there.
    7. Copy that content and save it as .xsl file.
    8. Zip above .xsl file and import the same into IR under Imported Archives.
    Hope this clears your doubts
    Thanks
    Saiyog

  • Java and enterprise systems

    Hi,
    I was wondering if anyone could shed some light on using "java to develop enterprise systems".
    I'm a little confused about it all, about the features of jave which support enterprise systems and the different tools that can be used, and also how java might be used in an enterprise context.
    If anyone could help I would be very grateful.

    Thanks for replying, I will take a look at those links.
    Like I mentioned earlier the sort of thing I'm looking into is:
    - The features of java that support enterprise systems
    - Tools that support java development
    - And an example that i could look into further where java has been used in a enterprise context.
    I have very brief knowledge of J2ee and EJB's so this is all sort of over my head and just sort of need a point in the right directio of things I should be looking into. If you can point me the right way I would really appreciate it.

  • Questions about Collections.shuffel and error message

    I am trying to get my poker game to work but it comes up with an error when it trys to score the hand
    *public class PokerTester{*
    Deck deck *=* new Deck*();*
    public PokerTester*()*
    playGame*();*
    public void playGame*()*
    *{*+//stacks hand+
    Hand hand *=* new Hand*();*
    for(int i*=* 0*;* i*<* 5*;* i*++)*
    hand*.*add*(*deck*.*getTopCard*());*
    System*.*out*.*println*(*"Player's Hand:"*);*
    hand*.*showHand*();*
    public static void main*(*String*[]* args*)*
    new PokerTester*();*
    public class Hand*{*
    ArrayList<Card> hand=new ArrayList<Card>();
    int[] values = new int[5];
    public void add(Card card)
    hand.add(card);
    +
    public String getHandValue()
    +
    String win= "";
    for(int i= 0; i<5; i++)
    *values=values[((Card)hand.get(i)).getValue()];*
    Arrays.sort(values);
    if(checkRoyalStraight()&&checkFlush()) win="Royal Flush";
    else if(checkFlush()&&checkStraight()) win="Straight Flush";
    else if(checkOfAKind(4)) win = "4 of a Kind";
    else if(checkFullHouse()) win = "Full House";
    else if(checkFlush()) win = "Flush";
    else if(checkStraight()) win = "Straight";
    else if(checkOfAKind(3)) win = "3 of a Kind";
    else if(checkOfAKind(2)) win = "Pair";
    else win = "High Card";
    return win;
    +
    public boolean checkOfAKind(int n)
    +
    boolean kind=false;
    if(n==4)
    if(values[0]==values[3]||values[1]==values[4])
    kind=true;
    if(n==3)
    if(values[0]==values[2]||values[1]==values[3]||values[2]==values[4])
    kind=true;
    if(n==2)
    for(int i=0; i<4; i++)
    *if(values[i]==values[i+1])*
    kind=true;
    return kind;
    public boolean checkFullHouse()
    boolean fullhouse=false;
    if(values[0]==values[2]&&values[3]==values[4])
    fullhouse=true;
    else
    if(values[2]==values[4]&&values[0]==values[1])
    fullhouse=true;
    return fullhouse;
    public boolean checkFlush()
    int suit = ((Card)hand.get(0)).getSuit();
    for(int i=1; i<5; i++)
    if(((Card)hand.get(i)).getSuit() != suit)
    return false;
    return true;
    public boolean checkStraight()
    int count=0;
    for(int i=0; i<4; i++)
    *if(values[i]+1==values[i+1])*
    count++;
    if(count==4)
    return true;
    else return false;
    public boolean checkRoyalStraight()
    int n=10;
    for(int i=0; i<5; i++)
    *if(values[i]==10)*
    n++;
    if(n==15)
    return true;
    else return false;
    +
    public void showHand() +
    +
    +
    for(int i= 0; i<5; i++)
    int suit=hand.get(i).getSuit();
    String s="";
    if(suit==0)
    s="Hearts";
    else if(suit==1)
    s="Spades";
    else if(suit==2)
    s="Clubs";
    else s="Diamonds";
    System.out.println(((Card)hand.get(i)).getValue()+" of "+s);
    System.out.println("Hand value: "+getHandValue());
    public class Deck
    Card*[]* cards *=* new Card*[*52*];*
    ArrayList*<*Card*>* deck *=* new ArrayList*<*Card*>();*
    public Deck*()*
    for(Integer i*=*0*;* i*<*4*;* i*++)*
    for(Integer n*=*1*;* n*<=*13*;* n*++)*
    deck*.*add*(new* Card*(*n*,* i*));*
    +
    Collection*.*shuffle*(*deck*);*
    +
    public Card getTopCard*()*
    Card topCard *=*deck*.*get*(*0*);*
    deck*.*remove*(*0*);*
    return topCard*;*
    public class Card*{*
    private int value;
    private int suit;
    public Card(int value,int suit)
    this.value=value;
    this.suit=suit;
    public int getValue()
    return value;
    public int getSuit()
    return suit;
    {color:#000000}
    This is what i get when I run the program{color}
    1 of Hearts
    2 of Hearts
    3 of Hearts
    4 of Hearts
    5 of Hearts
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5
    at Hand.getHandValue(Hand.java:22)
    at Hand.showHand(Hand.java:145)
    at PokerTester.playGame(PokerTester.java:16)
    at PokerTester.<init>(PokerTester.java:6)
    at PokerTester.main(PokerTester.java:21)
    Also I cannot get the Collections.shuffle() to work correctly does anyone know how to use this properly, Thank you

    When you use the letter "i" for an array index without using the code tags, the forum interprets that to mean "start italic" and your code is mangled - converted to italic and changed.
    Repost using code tags:
    [code]
    Put your code here
    [/code]
    This error
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5means that an array index value is greater than the max value allowed for the array.
    If you can't fix this, identify the line where the error is happening (it's line 5)

  • Java and ABAP system, setting new password rules

    Hello,
    we have a ecc 6.0 and in front for the users we have a portal based on netweaver 7.0. Our security colleagues told us, to change the password rules based on our new security book. the portal is getting the users via ume and the datasource is the abap system (ecc 6.0). All users accessing the form the portal to the backend system are communication users. my question now. there are two possiblities to change password rules settings. one in the java system and the other on the abap system. where should be implement the password rules? would the changes on the abap system also affect the java system?
    regards,
    alexander tuerk

    > we have a ecc 6.0 and in front for the users we have a portal based on netweaver 7.0. Our security colleagues told us, to change the password rules based on our new security book. the portal is getting the users via ume and the datasource is the abap system (ecc 6.0).
    For password rules please check the documentation: [Logon and Password Security in the SAP System|http://help.sap.com/saphelp_nw04/helpdata/en/52/6717ed439b11d1896f0000e8322d00/content.htm]
    [Profile Parameters for Logon and Password (Login Parameters)|http://help.sap.com/saphelp_nw04/helpdata/en/32/20709747d649e8bc74e084d0b2432c/frameset.htm]
    and the SAP Note: [Note 862989 - New password rules as of SAP NetWeaver 2004s (NW ABAP 7.0)|https://service.sap.com/sap/support/notes/862989]
    [2467 - Password rules and preventing incorrect logons|https://service.sap.com/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=0000002467&nlang=E]
    All users accessing the form the portal to the backend system are communication users. my question now. there are two possiblities to change password rules settings. one in the java system and the other on the abap system. where should be implement the password rules? would the changes on the abap system also affect the java system?
    Please go through the following Link: [Users and Passwords for AS JAVA|http://help.sap.com/saphelp_nw04/helpdata/en/3d/addc3ed98f7650e10000000a114084/content.htm]
    Regards,
    Dipanjan

  • Java and JVM relation and specification

    Hello,
    There's something I don't understand, the Java specification doesn't seem to have a new version each new java version, and it's seems to be the for the jvm. So i have some questions :
    - When does the spec change? I suppose that it is only when the core language change. Does it means that from Java 5 to Java 6, the API has change but nothing in the language?
    - The link between the JVM and java is the class file. The JVM spec hasn't change since 1999... Does this mean that the .class hasn't change since 1999 while the java core language has change?
    Thanks in advance for your answer

    thibaultdelor wrote:
    Hello,
    There's something I don't understand, the Java specification doesn't seem to have a new version each new java version, "Java version" would refer to the release of the Sun VM presumably. And presumably you are referring to the Java Language Specification (JLS.)
    The JLS represents the java language and nothing more.
    The Sun VM represents the VM, Java API and associated tools. The Java API, with the exception of a very few classes in java.lang, is not part of the JLS. Thus an major update to the Java API could be, and is, cause for a version update to the Sun VM. A JLS change would be as well.
    - When does the spec change? I suppose that it is only when the core language change. Does it means that from Java 5 to Java 6, the API has change but nothing in the language?I believe that is correct. I am pretty sure, Generics, memory model and enums were added in 1.5. I believe there were language changes being considered for 1.7 as well.
    - The link between the JVM and java is the class file. The JVM spec hasn't change since 1999... Does this mean that the .class hasn't change since 1999 while the java core language has change?Depends on what you mean. The structure hasn't changed. The data in the structure as changed.
    You might also note that the Java Native Interface Specification has changed as well.

  • About business service and business system

    before,i used business service.
    i can add inbound and outbound interface at sender tab page and receiver tab page of business service entry in ID.
    now,i am using business system.
    i can not add inbound and outbound interface at sender tab page and receiver tab page of business system entry in ID.
    i am confused.
    my swcv design.like this:  A_,  AND I_ .
    I_    depends A_.     that is: A_  swcv contains same namesapce with I_ swcv in "basis object" entry.
    i want to use the interface of A_ swcv instead of I_ swcv.
    but i can only find out  the interface of I_ swcv on the sender tab page and receiver tab page of business system entry in ID.
    actually, i want to use the interface of A_  swcv.   intead of the interface of I_ swcv.
    how can i make it?

    - In SLD while creating the BusinessSystem, the I_SWCV is assigned to it. That is the reason you can able to see the interface of I_SWCV. Assign the A_SWCV to the Business System in SLD, you can able to see interfaces of that too.
    Assign the A_SWCV to the Business System .
    i wanna find out the  interface of "basis object" of  A_SWCV.  but i can not.
    may be since  it is not really within A_SWCV  of  the  interface of "basis object" of  A_SWCV.
    actually. it is within I_SWCV.
    you got me?
    is that so?

  • Java and operating systems

    would changing the OS to winXP or win2000 affect the java run-time environment? if so, what could be done to make them compatible?
    thanks!

    well, basically winXP just warned me that the j2sdk1.4.0_02 plug in in the control panel wouldn't support winXP.
    Do I have to download the later versions of the SDK?

  • Webdynpro Java and Webdynpro ABAP

    hi all,
    Im working in webdynpro java. Im confused about WD java and WD ABAP. which one we should select for what? And now a days people are telling that SAP is coming up all business packages in WD ABAP. Is it true? Which one is better either WD Java or ABAP?
    Thanks,
    J.Smitha.

    Smitha,
    It's tough question to answer. Which one to choose either Web Dynpro java or Web Dynpro ABAP , it depends on which technology you are comfortable. In relation to the business packages SAP already provided allmost all of them in java and in the future all the Business packages also available in ABAP. It's all how you want to develop the application. In sap portal world some applciation which we can develop with ABAP Web Dynpro and some applications with JAVA Web Webdynpro as SAP Web AS available as dual stack.
    If someone already has a strong ABAP background and has WD for ABAP available they should probably use that. If they are a J2EE developer they should probably use WD for Java but it is likely they will also then need some ABAP support for the backend systems.
    I think more customers may be asking for WD for Java projects simply because it has been around longer and is more widely available to customers where as some cutomers prefer to develop their application using ABAP Web Dynpro because of SAP propritary. But ultimately it's again all our interest and customer.
    Thanks
    Krishna

  • Error while creating connection between Java and ABAP

    Experts
    I am getting the following error message when I am trying to test the connection between JAVA and ABAP systems.
    1. The system ID is valid
    2. The system was retrieved.
    3. The system object represents an SAP system
    4. The following parameters are valid: Web AS Protocol (http) Web AS Host Name (s09f71v06.svr.bankone.net:8100)
    5. The host name s09f71v06.svr.bankone.net was resolved successfully.
    6. The server s09f71v06.svr.bankone.net *could not be pinged* successfully.
    I have JAVA and ABAP on the same system. I am trying to establish a connection. I have checked all the settings and they looks fine. I have also pinged from other system to this server and the Ping works fine.
    Please do let m eknow where do I need to check for the errros or logs for the above error message.
    Appreciate your quick help.
    Mahesh

    Check the relevant services are test are active on the Backend system through SICF trransaction.
    Also make sure that default icm services are running.See note 517484.
    More important the connector test in the portal system should work properly,recheck the WAS path etc are correct.
    Regards
    Ajay

  • Career Management and Grading Systems in SAP

    I'd like to learn about Career Management and Grading Systems in SAP. My company is currently in the process of implementing a dual career path (specialist vs. structural) for our IT organization, as one of the initiatives to improve engagement level of technical employees.
    Best Regards,
    Iwan Prajogi

    Hi Iwan,
    Thanks for your reward.Well actually SAP itself  implemented mySAP E-recruiting 6.0 and the succesion planning module does the task.
    I am afraid I can't give exact information as to the technical positions, but what I see is it is a so called TALENT GROUP in e-recruiting.
    <b>Succession Planning Program
    SAP also has a special interest in employees who have the potential to move into key positions within targeted timeframes. An annual program identifies successors for management and executive positions. Like the high potential process, the career-development needs of our leaders are carefully planned and tracked.</b>
    The above given is an excerpt from SAP career publications.
    regards,
    Bharat
    Note:Pls. reward pts. if the answer caters your need.
    Message was edited by: Bharat
    Message was edited by: Bharat

  • Three questions about Java and Ftp

    Hello, i've the following questions about Java and Ftp:
    1- .netrc file is in $HOME directory but i can't access to this directory from java code. The following line producesan Exception (directory doesn't exists)
    FileWriter file = new FileWriter ("$HOME/.netrc");
    2- .netrc file must have the following permissions: -rw- --- --- but when i create the .netrc file the following permissions are on default: -rw- r-- r--, how can i change this permissions? (In java code, i can't use chmod.....)
    3- Are there any way to pass parameters to a .netrc file? If i get to do this i needn't change the permissions because i can't modify or create/destroy this file.
    Thanks in advanced!!!
    Kike

    1- .netrc file is in $HOME directory but i can't
    access to this directory from java code. The
    following line producesan Exception (directory
    doesn't exists)
    FileWriter file = new FileWriter ("$HOME/.netrc");$HOME would have to be replaced by a shell, I don't
    think you can use it as part of a legal path.
    Instead, use System.getProperty("user.home");
    Ok, thanks
    2- .netrc file must have the followingpermissions:
    -rw- --- --- but when i create the .netrc file the
    following permissions are on default: -rw- r--r--,
    how can i change this permissions? (In java code,i
    can't use chmod.....)Yes, you can: Runtime.exec("chmod ...");
    I need to use estrictly the .netrc with -rw- --- --- permissions
    Yes, i can use Runtime.exec ("chmod ..."); but i don't like very much this solution because is a slow solution, am i right?
    3- Are there any way to pass parameters to a.netrc
    file? If i get to do this i needn't change the
    permissions because i can't modify orcreate/destroy
    this file.I don't think so. Why do you need the .netrc file in
    Java at all? Writing a GUI frontend?I want to use automatic ftp in a java program and FTP server, the files and path are not always the same, so i can:
    - modify .netrc (for me is the complex option)
    - destroy and create a new .netrc (is easier but i have permissions problem)
    - use .netrc with parameters but i haven't found any help about it
    Thanks for your prompt reply!!!!
    Kike

  • Oracle JVM and Operating System JVM different?

    Are Oracle JVM and Operating System JVM different?
    For applying the DST patches if JVM is updated from OS patches do we need to apply any other jvm patches again?

    Hi,
    Yes, the OracleJVM is embedded in the RDBMS kernel and does not share any reference/components with the JDK (i.e., OS JVM); fwiw, you can learn more about OracleJVM (archtecture, memory management, security, threading, performance) in chapter two of my book.
    Regarding the DST patch, there is an RDBMS patch that should cover OracleJVM as well; Re: How to verify if the DST patch applied correctly or not.
    Kuassi http://db360.blogspot.com

  • Doubts about HTTPS requests and Java proxy

    Hello,
    I need help about SSL connections and Java.
    I'm developing a HTTP/S proxy with Java. To test my proxy, I use Firefox. I configure the proxy option in the browser. The proxy works good with HTTP requests, but with HTTPS requests doesn't work and I don't know why.
    I explain the steps that I do for a HTTPS request:
    * The browser sends a CONNECT message to the proxy.
    I check that the proxy receives the CONNECT request correctly.
    * The proxy establish a secure connection with the content server.
    I use an SSLSocket to connect with my content server, and the SSL handshake is succesful.
    * The proxy sends a 200 HTTP response to the client:
    I send
    HTTP/1.0 200 Connection established[CRLF]
    [CRLF]
    to the application client (Firefox)
    * The proxy sends/receive data to/from Firefox/content server
    I have a Socket between Firefox and my proxy, and a SSLSocket between my proxy and my content server. I use two threads to communicate the client and the server.
    Java code:
    //Thead server-->proxy-->application(Firefox)
    ThreadComm tpa = new ThreadComm(bis_serverSSL, bos_app);
    //Thread application(Firefox)-->proxy-->server
    ThreadComm tap = new ThreadComm(bis_app, bos_serverSSL);
    The "tpa" thread reads from the SSLSocket between the proxy and the server and sends data to the Socket between the proxy and Firefox.
    The "tap" thread reads from the Socket between the proxy and Firefox and sends data to the SSLSocket between the proxy and the server.
    This is the class ThreadComm:
    public class ThreadComm extends Thread{
        private BufferedInputStream bis = null;
        private BufferedOutputStream bos = null;
        public ThreadComm(BufferedInputStream bis, BufferedOutputStream bos) {
            this.bis = bis;
            this.bos = bos;
        @Override
        public void run() {
            int b = -1;
            FileOutputStream fos = null;
              do {
                   try {
                        b = bis.read();
                        System.out.print((char) b);
                        fos.write(b);
                        bos.write(b);
                        bos.flush();
                   } catch (Exception ex) {
                        Logger.getLogger(ThreadAplicacionProxy.class.getName()).log(Level.SEVERE, null, ex);
                        //b=-1;
              } while (b != -1);
        }But this doesn't work and I don't know why.      
    I have an Apache server with the mod_ssl enabled as content server, I can send requests (with Firefox) to the port 80(HTTP request) and 443(HTTPS request) without use my proxy and it works. If I use my proxy, HTTP request works but with HTTPS request doesn't work, I look the log of Apache and I see:
    [Tue Apr 27 17:32:03 2010] [info] Initial (No.1) HTTPS request received for child 62 (server localhost:443)
    [Tue Apr 27 17:32:03 2010] [error] [client 127.0.0.1] Invalid method in request \x80\x7f\x01\x03\x01
    [Tue Apr 27 17:32:03 2010] [debug] ssl_engine_kernel.c(1770): OpenSSL: Write: SSL negotiation finished successfully
    [Tue Apr 27 17:32:03 2010] [info] [client 127.0.0.1] Connection closed to child 62 with standard shutdown (server localhost:443)
    Why it say? Invalid method in request \x80\x7f\x01\x03\x01 , my proxy sends the data that the Firefox sends.
    I think than I have follow the explanations of [1] but doesn't work, I have problems in implementation in Java but I don't know where.
    I appreciate any suggestions.
    Thanks for your time.
    [1] http://www.web-cache.com/Writings/Internet-Drafts/draft-luotonen-web-proxy-tunneling-01.txt

    ejp, I have checked the socket between the proxy and server and ... You are right! , I was using the port 80 instead of the 443 (incredible mistake!, I'm sorry). I was convinced that I was using the port 443... Well, is a little step, but I still have not won the war :)
    If I see the log files of Apache, We can see that something goes wrong.
    localhost-access.log
    >
    127.0.0.1 - - [04/May/2010:17:44:48 +0200] "\x 80\x 7f\x01\x03\x01" 501 219
    >
    localhost-error.log
    >
    [Tue May 04 17:44:48 2010] [info] Initial (No.1) HTTPS request received for child 63 (server localhost:443)
    [Tue May 04 17:44:48 2010] [error] [client 127.0.0.1] Invalid method in request \x80\x7f\x01\x03\x01
    [Tue May 04 17:44:48 2010] [debug] ssl_engine_kernel.c(1770): OpenSSL: Write: SSL negotiation finished successfully
    [Tue May 04 17:44:48 2010] [info] [client 127.0.0.1] Connection closed to child 63 with standard shutdown (server localhost:443)
    >
    I think that this happens because Apache receives the data without decrypt, this is the reason because in the log we can see the "Invalid method in request \x80\x7f\x01\x03\x01". This supposition is true?
    ejp, you say that the "Termination is quite tricky." I have changed my code following yours suggestions (using the join and the shutdownOutput) but the threads don't die.
    I explain you what I do:
    (in time 1)
    I launch the thread (threadFirefoxToApache) that reads data from Firefox and sends to Apache.
    I launch the thread (threadApacheToFirefox) that reads data from Apache and sends to Firefox.
    (in time 2)
    threadFirefoxToApache sends the firts data to the server.
    threadApacheToFirefox is waiting that the server says something.
    (in time 3)
    threadFirefoxToApache is waiting that Firefox says something.
    threadApacheToFirefox sends data to Firefox.
    (in time 4)
    threadFirefoxToApache is waiting that Firefox says something.
    threadApacheToFirefox is waiting that Firefox says something.
    and they are waiting... and never finish.
    In time 2, these first data are encrypted. The server receives these data and It doesn't understand. In time 3, the server sends a HTTP response "501 Method Not Implemented", here there is a problem because this data must be encrypt. According to the documentation that I read, the proxy cannot "understand" this data but I can "understand" this data. What's happen?
    Firefox encrypt the data and send to the proxy. This It's correct.
    The proxy encrypt the data another time, because I use the SSLSocket to send the data to the server. Then the server receives the data encrypted two times, when decrypt the data gets the data encrypted one time. And this is the reason why the server doesn't understand the data that sends Firefox. It's correct? May be.
    Then If I want that the server receives the data encrypted one time I need to use the socketToServer, It's correct?
    I will supposed that yes. If I use the socketToServer, the proxy doesn't understand nothing, because the data received from the socketToServer are encrypted (I only see simbols), but the Apache log says that there is a problem with the version? (If I use the socketToServer the threads die)
    >
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 read finished A
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write change cipher spec A
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write finished A
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 flush data
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1756): OpenSSL: Handshake: done
    [Tue May 04 19:55:42 2010] [info] Connection: Client IP: 127.0.0.1, Protocol: TLSv1, Cipher: RC4-MD5 (128/128 bits)
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_io.c(1817): OpenSSL: read 5/5 bytes from BIO#29bd910 [mem: 29ea0a8] (BIO dump follows)
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_io.c(1750): -------------------------------------------------------------------------
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_io.c(1789): | 0000: 80 7f 01 03 .... |
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_io.c(1793): | 0005 - <SPACES/NULS>
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_io.c(1795): ------------------------------------------------------------------------
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1770): OpenSSL: Write: SSL negotiation finished successfully
    [Tue May 04 19:55:42 2010] [info] [client 127.0.0.1] SSL library error 1 reading data
    [Tue May 04 19:55:42 2010] [info] SSL Library Error: 336130315 error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1770): OpenSSL: Write: SSL negotiation finished successfully
    [Tue May 04 19:55:42 2010] [info] [client 127.0.0.1] Connection closed to child 63 with standard shutdown (server localhost:443)
    >
    What option is the correct? I need use the SSLSocketToServer or socketToServer to send/read the data to/from the server?. Use the SSLSocket has sense because the data travel in a secure socket, but use the Socket also has sense because the data are encrypted and they are protected by this encription. It's complicated...

Maybe you are looking for

  • Scrolling through fonts problem (goes to the end of the list)

    hi! i have a text selection and i am going through the installed fonts by hitting the up/down arrow in the "Character:" drop-down list. What happens is when i come across a font that for some reason doesn't have a the name displayed in the textbox, t

  • Satellite Pro M70 - How to activate touchpad mouse by use of keyboard?

    I somehow lost connection to the touchpad mouse. How can I activate it again by use of the keyboard (I don't have any external mouse)? Asia ;o)

  • Getting strange messages and Logic won't open PLEASE HELP!

    I haven't opened Logic for a few weeks because I have been out of town. I just tried to open a project and got the message "logic pro has detected a possible conflict between one or more third party midi or audio drivers" and an empty project pops up

  • How to update costing under the Organization defination

    dear, We are on testing face, we have to update around 100 cost cener throug api but it's now being executed and raise an error. What is the value to be passed for p_cost_allocation_id ? ora-20001 hr_7220_invalid_primary_key pay_cost_allocation_api.U

  • Installing OVI Suite on secondary hard disk

    is there any solution for installing OVI Suite on secondary hard disc?? ( i have asus ee and there is no free space on primary C: hard disc so i need to instal it on external hard disc, how can i change instalation folder??) thanks! Solved! Go to Sol