User Profile

Collapse

Profile Sidebar

Collapse
Abhinay
Abhinay
Last Activity: Feb 24 '09, 07:48 AM
Joined: Jul 18 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Abhinay
    replied to Issue regarding log4j
    in Java
    Thank all of you for helping me, finally I got the root cause of problem.
    This problem is due to static layout which I was sharing with all logger appenders.


    ---Abhinay
    See more | Go to post

    Leave a comment:


  • Abhinay
    replied to Issue regarding log4j
    in Java
    Thank you umbr for your suggestion,

    but what should I do if I want to create logger at runtime ?

    My thread count ( hence logger ) are configurable hence I can't decide and configure logger in advance, I must have to create logger at runtime.
    See more | Go to post

    Leave a comment:


  • Abhinay
    replied to Issue regarding log4j
    in Java
    I changed my logic as below

    Code:
    public static final Logger getLogger( final String sLoggerName )throws IOException
    {
      final Logger logger = LogManager.exists(sLoggerName);
            if(logger != null)
            {
                return logger;
            }
     
             Logger newLogger = LogManager.getLogger(sLoggerName);
            //Logger is not exists so create appender for logger
    ...
    See more | Go to post

    Leave a comment:


  • Abhinay
    started a topic Issue regarding log4j
    in Java

    Issue regarding log4j

    Hi there,

    I am working on server which used thread pool to process each client request by separate dedicated thread.
    My intention was each thread ( of thread pool ) have its own logger and hence all client processed by that thread must be logged in corresponding thread specific logger.

    My problem is that logger merging log content with other logger content, my doubt is Logger.getLogge r(...) function return wrong...
    See more | Go to post

  • Abhinay
    replied to Is static function thread safe ?
    in Java
    thank you Jos !!!!!!!!!
    See more | Go to post

    Leave a comment:


  • Abhinay
    replied to Is static function thread safe ?
    in Java
    Hello,

    thanks again for taking interest in question.

    As per my knowledge when server (server socket) accept client request, it assign new dedicated socket for further communication with client and go back to original server socket and watch for new client request.

    In my server each client request is handaled by dedicated server thread so I guess received socket ( client request ) will not share by two thread....
    See more | Go to post

    Leave a comment:


  • Abhinay
    replied to Is static function thread safe ?
    in Java
    hi josah,
    I appreciate your quick response,
    here is defination of my static function
    Code:
    public static Message getDetails( final DataInputStream clientInputStream )throws Exception
    {
    
     //Read message length
     byte bMsgLen[] = new byte[2];
     clientInputStream.readFully( bMsgLen );
    
     //Convert byte to integer
     int iMsgLen = byteToInteger( bMsgLen );
     //Read message 
     byte
    ...
    See more | Go to post

    Leave a comment:


  • Abhinay
    started a topic Is static function thread safe ?
    in Java

    Is static function thread safe ?

    Hi there,

    I am developing server in java which accept client request in multi threaded fashion and response back, each client request will be process by separate dedicated server thread.

    I have write static function to read data from client socket at once
    prototype:
    Code:
    public static ISOMessage getDetails( final DataInputStream clientInputStream );
    is this static function thread safe ???...
    See more | Go to post

  • Abhinay
    replied to How develop server in java
    in Java
    Thank you very much for your suggestion, if posible can you please give me any idea for running server ( JVM ) as daemon in windows.
    See more | Go to post

    Leave a comment:


  • Abhinay
    started a topic How develop server in java
    in Java

    How develop server in java

    Hi there,

    I am new in java, I was C++ developer.
    I have to develop echo server using java which would be run on windows , I am ready with server logic.

    I am stuck in basic code of java server as I don't understand how to write code for server start / stop as well run java server as daemon process ( like C++ ).

    Is there any thing in java simillar to windows services in C++ ??

    Please suggest...
    See more | Go to post

  • Abhinay
    started a topic Need help regarding java SSL
    in Java

    Need help regarding java SSL

    Hi there,
    This is abhinay,

    I am developing one java SSL socket based client/server application but I did't get proper answer of following questions.

    1. Fow two way verification is it neccesory to import certificate from both side alredy ?

    2. What should do to get, store (in trust store ) and use (public key) certificate from client/server while transaction ( handshaking ) ?

    ...
    See more | Go to post

  • Abhinay
    started a topic Need help regarding RPC on linux
    in C

    Need help regarding RPC on linux

    hi there,

    I am a C++ programer working on linux OS,
    I wanted to know , whether linux supports persistanc RPC ( Remote procedure call ).

    I am aware about RPC supported by linux but I think it is not object oriented hence it can't mentain state of object created by client.

    How can I achive persistance RPC call using C++ just like java provides.

    your help would make me happy.
    ...
    See more | Go to post

  • Abhinay
    started a topic Need help regarding replication in MySql database.

    Need help regarding replication in MySql database.

    Hi there,

    I am C++ programer, new in MySql database, I am using linux OS.

    Is MySql supports pear to pear replication ( I wanted to duplicate data of master database to salve database at run time for each and every transaction ) ? If no then how to achive it ?

    I know SqlServer provides pear to pear replication and I wanted to know about similar facility in MySql database.

    your help would...
    See more | Go to post

  • Abhinay
    replied to Cannot allocate memory
    in C
    Thank all of you for helping me,
    I have solve issue using connection pool.

    Thank you
    Abhinay
    See more | Go to post

    Leave a comment:


  • Abhinay
    started a topic Mysql server has gon away
    in C

    Mysql server has gon away

    hi,

    I have created echo server whose task is to receive client request using socket and make inset into mysql database, for database connection I have use 'Mysql C' library, my server have dedicated thread to process each client request ( using connection pool ).

    My question is while inserting into mysql database in multithreaded fashon ( number of thread >= 100 simultaneously ) I get some time "Mysql server...
    See more | Go to post

  • Abhinay
    replied to Cannot allocate memory
    in C
    Thanks for your reply,
    My server thread only receive transaction ( using socket ) information and insert into database after that I close socket ( from both side ) and terminate the corresponding thread. I have not allocated any memory using "new" operator in my code....
    See more | Go to post

    Leave a comment:


  • Abhinay
    started a topic Cannot allocate memory
    in C

    Cannot allocate memory

    hi,

    I have created a echo server which accepts request from client , for each client request processing my server creates new thread but after creating 305 thread it says "Cannot allocate memory" Errocode = 12.

    I have close socket of both sides as well as use PTHREAD_CREATE_ DETACHED flage while thread creation.

    I am working on CentOS (linux) and using pthread_create( ) function for thread creation....
    See more | Go to post

  • Abhinay
    replied to Parse error
    in C
    My aplication is multi threaded daemon process, one thread for one client and each client have its own xml file, no chance of sharing input xml file....
    See more | Go to post

    Leave a comment:


  • Abhinay
    started a topic Parse error
    in C

    Parse error

    hi,

    I wrote function to validate my xml file against specified schema, it works fine in most of the cases, but some times validation failed because following parse Error.

    The process cannot access the file because it is being used by another process.

    can any budy help me, to find out its unexpected behaviours or I missed somthing in my code.
    I have close file pointer before validation process. If...
    See more | Go to post

  • Thank you very much
    Abhinay...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...