Help with design required.....

hi,
i have a server which uses the following mechanism to log messages into a log file.
public static void Message(String msg)
     print(msg);
public void print( String msg )
     intprint(msg);
private synchronized void intprint(String msg)
     i write into a log file using RandomAccessFile.
the Message method is called by 100 of classes to write into the log file.since the intprint(--) is synchronized and with so many other classes trying to use it, it slows down my server.
i was trying to have a design to make it faster.can somebody help me with that...any suggestions??
Thanks,

Use threads and queues for the purpose. How about using arraylist for queuing purposes. The no of messages in the queue can be as many as you want.

Similar Messages

  • Help with design of this home network setup

    Hello all
    My friend's home has internet through Comcast and their modem is an RCA DHG535-2. This modem is currently functional in their office within the home. Their problem is the wireless signal is very weak in their basement. They have purchased a TC and have placed it in their office and wired to their iMac through ethernet. Is their a better way to design this setup so the Time Capsule can provide a broader and better range throughout their home?
    For example,
    1) Can the physical location of the TC change in order to broaden and evenly provide wireless range throughout the home? I would think not since the TC needs to be wired connected to the modem.
    2) Would an Airport Express help out?
    If you can provide a step by step to set this up, I would greatly appreciate this
    Many thanks
    RezF

    Rezf, welcome to the discussion area!
    1) Can the physical location of the TC change in order to broaden and evenly provide wireless range throughout the home? I would think not since the TC needs to be wired connected to the modem.
    Since you mention that the TC is connected to the iMac with an ethernet cable, it sounds like the location options of the TC are going to be somewhat limited. Technically, you could locate the TC anywhere as long it was connected to the modem with an ethernet cable.
    If the office is located in a central area of the home, that would be a good location for the TC
    2) Would an Airport Express help out?
    Possibly. The usual location for an AirPort Express is a point that is approximately 1/2 to 2/3 the distance from the main router (the TC) to the area that needs more coverage. If you have a laptop handy, move it to the proposed location of the AirPort Express and see if you can get a good, stable internet connection at that location. If you can, the AirPort Express should provide improved wireless coverage to the basement.
    If your friends can pull an ethernet cable from the TC to the area in the basement that needs more wireless coverage and connect an AirPort Express to the ethernet cable, that will provide the strongest wireless signal to the specific area.

  • Need help with designing form for exports

    Hi
    I am pretty new to designing form in adobe acrobat.
    I have adobe acrobat 9 standard with Adobe liveCycle Designer installed.
    There are couple of things I want to do.
    1.
    I would like to add a box where I can change the number (default is 1), and when I increase it, (for instance to two)
    then
    it will postulate the particular sections twice.
    For instance, I am taking two drugs right now, then I would like to increase the number of drugs to 2, so then for each drug
    I would enter appropriate information such as drug name, drug form, route of drug administration etcs
    I hope this is clear
    2.
    I am trying to export this in xml format so that only the ones where the user fills in in pdf form gets exported to xml format.
    I would like the boxes to have its own tag, for instance the drug name mentioned above can have a tag of <drugname></drugname>
    I know this is possible through changing the box's name in binding tab.
    What I am interested in is to add a tag for the section, like a header.
    For example, if I were to enter two drug information I want the first drug information to be exported to be
    <drug>
    <drugname>blah</drugname><drugform>1</drugform><drugroute>oral</drugroute>
    </drug>
    <drug>
    <drugname>drug2</drugname><drugform>1</drugform>
    <drugroute>ophthalmic</drugroute>
    </drug>
    how would I add <drug> </drug> for each drug?
    also, can I change the order of the tags??
    in the pdf form, if the drugname box is displayed later than drugroute box, then when I export it, it will display as
    <drugroute>oral</drugroute><drugname>blah</drugname>
    but I want to manually set the order of tags when exported.
    Sorry I asked so many questions
    I hope it is clear enough for you to visualize what I am trying to do
    Thank you so much

    1. You can certainly add sections for the number of drugs that the user specifies pr
    ovided that the form is set up the correct way to begin with. The drug information section must be wrapped in a subform (usually Poistioned) and that in turn must be wrapped in a flowed subform. Then the form must be saved as dynamic. If this information is all that is on the form then that shoudl be all you need to do. If th edrug section is in the middle of the form then you need to wrap the other parts of the form in a subform so they can be pushed down when we add the drug subforms. It can get confusing ...seeing the form amnd its structure would help to clarify.
    2. You canbnot change the names of tags on the fly but you can change their values. AS mentioned above, when you wrap the Drug information in a subform that subform name can be used as a tag in the XML. Then you could have a node with the tag (or an attribute) that names the drug in question. Something like this:
    <Drug Section>
         <Drug>
              <DrugName></DrugName>
              <Dossage></Dossage>
              <Supplier></Supplier>
         </Drug Subform>
         <Drug>
              <DrugName></DrugName>
              <Dossage></Dossage>
              <Supplier></Supplier>
         </Drug>
    </Drug Section>
    As mentioned earlier this is always easier to explain when you see it in context of your form.....if you want to send it to me at [email protected] I can get you started at least. Please include a description of your issue in the email
    Paul

  • Need help with design decision: JavaEE or JavaSE

    Hello folks,
    We are developing an application that has the following requirements:
    - Client will be a desktop client developed in Swing
    - JPA will be used for ORM modelling on server-side
    - MySQL will be used as the DB
    - JMS will be used for client-server event communication (since we need a robust event communication mechanism)
    Given the above, we are not able to decide whether to stick to Java SE or to use Java EE.
    I understand that if we decide to stick to Java SE, JPA can be used but what about JMS?
    Is there a way to use JMS without an application server?
    If not, would it be appropriate to use an App Server just for the sake of JMS?
    (We don't want to go with a third-party framework like Spring just for using JMS.
    For us, the choice is between Java SE or Java EE.)
    What do you people suggest would be better?
    Your inputs will be of great help.
    Thanks much,
    Sandeep

    Here is one way to approach this:
    I would first write the use cases like:
    GeneralUser -> (maintain local data)
    AdminUser    -> (maintain local data)
    GeneralUser -> (export to central data)
    AdminUser    -> (export to central data)
    GeneralUser -> (view common data)
    AdminUser    -> (view common data)
    AdminUser    -> (manage users) << include >> (add user), (delete user)then I would apply the pattern (http://www.theserverside.com/patterns/thread.tss?thread_id=17595)
    and identify the following three apps and the components that they depend on:
    LocalDataApp    { AuthenticationMgr, LocalDataMgr }
    CentralDataApp { AuthenticationMgr, ExportMgr, CentralDataMgr }
    UserAdminApp  { UserMgr }where the AuthenticationMgr component invokes the UserAdminApp to get the user info for authorization,
    the ExportMgr invokes the LocalDataApp to get the local data so the CentralDataApp can use CentralDataMgr to persist it in the central store.
    LocalDataApp and CentralDataApp could have one web front end and UserAdminApp could have another web front end. The communication between AuthenticationMgr and UserAdminApp could be via JNDI.
    Hope that helps,
    Nalla

  • HELP With security requirement

    Dear All,
    I�ve been working with J2EE for a while and now i am facing a requirement I assume J2EE can face but I would like some professional orientation.
    I�m developing a financial systema, Web & server, using GalssFish. The requirement I have is that "any system service" as I call the operations accessible from the client (web app) should be permission secured, that means, that for each User or Role, I sould be able to configure wich system services it can access ( at least) or more in depth wich level of security it has.
    Roles are not fixed, the sysadmin should be able to configure any Role, and assign to it any User, what is fixed are the system services. The permissions to each role for system service access should be configurable.
    I hope the explanation is understandable,
    Can anyone help me in order to assume this is possible with glassfish, and where could I read something nearly close to what I need (i�ve read JEE tutorial, and a buch of papers of security in EJB and Web tier but none provides information for my requieremtent).
    Regards,
    Germ�n Viera.

    Marco,
    One place you could put additional auth-check for you custom table is SE11 -> Utilities -> Table maintenance generator -> Environment -> Modification -> Events.
    I believe Event 25 is for inserting Auth-Check on table fields.
    Hope this help.
    Lye

  • For Expert (Help with designing my company VOIP infrstructure)

    Imy company have two offices with 200 users in each and we want to design VOIP solution has the next feature.
    Call forwarding
    Voicemail
    Integrated messaging
    Integration with CRM Tools
    Data Integration
    Automated call distribution
    Auto attendant
    Directory services
    Unified communication collaboration
    Web based administration tool
    Analytical tools
    Presence management
    I would like to know which devices, programs , and IOSs should I use?

    First of all
    Leo pointed you to the document i recently posted in CSC which can help you in the design phase if you are going to consider video in your network with voice
    to answer your questions based on the number of users you mentioned CUCM (business edition can be a good option )
    Call forwarding feature in CUCM
    Voicemail you can have unity connection with CUCM
    Integrated messaging unity connection can integrate with exchange and outloook
    Integration with CRM Tools what integration you need .. is it for contact center if yes then cisco UCCS contact center express can do it
    Data Integration same as above
    Automated call distribution you can use either UCCX or unity connection or basic call handling using CUCM
    Auto attendant UCCS or Unity connection
    Directory services CUCM can integrate with LDAP/AD or use a local directory
    Unified communication collaboration what type if collaboration, video,sharing ..!
    Web based administration tool most of the above is web based
    Analytical tools embedded with the above systems
    Presence management CUCM 9.x can have it iwth CUCM
    it is recommend to use virtualized UC services on UCS for cost saving as well and simplified design ( UC on UCS )
    Hope this help

  • Help with designing a system that will allow a code to be inputted during a five second window

    I need to design a system which allows a user to input a code combination during a five second window a correct input code during this window will generate a binary output of 1 to indicate that the lock is open, and at all other times and for any incorect code the output of the system will be zero indicating that the lock is closed. The system must be designed to allow a pre-set combination to be specified and easily changed. The system must display the time count during operation, noting that only three attempts for putting the code are allowed. On a fourth unauthorised attempt another application must set off an alarm. I have the
    combination lock functioning but am having
    difficulties with the five second timer and integrating the system as a whole. Any help would be greatly appreciated.

    Mazza,
    Try this VI out. It returns a boolean instead of an integer, but this is really the same thing from what you are talking about.
    You would use this VI as a subVI. It will pop up and allow user data entry. It passes the boolean out of it to see if the login was successful or not. You could also change things so that the password comparison (password in my case) is an input to the subVI as well.
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask
    Attachments:
    Timed_login_panel.vi ‏29 KB

  • Help with images required

    Hi, I am a new Macbook owner. I transfered some photos from my canon camera last week. Today some of these are corrupt. I tried sending the folder to a friend yesterday using podmail. Quite a lot of my images are now corrupt, but not all. All I have done is resizing in Preview a few days ago. How do I fix my images? They are very important to me as they are of me and my girlfriend. Any help is greatly appreciated.

    First, did you erase the camera? If not, import the pictures again.
    Second, are the pictures in iphoto? If they are, then look in your iphoto library in your user/pictures folder and look at them to see if there are originals that weren't messed with or which are otherwise ok. If they aren't in iphoto, try importing them into iphoto and then looking at them again.
    If you erased the camera and the images are all indeed screwed up, then you need to look at what you mean by "corrupt." Is it that the pictures themselves are mucked or that you can't open them. If the pictures are bad, then your only option is to play with them to try to improve them and there is no magic bullet. If you can't open them, then select one, get info on it (command + I) and see what the thing is set to open with. Make sure a photo program like Preview or iPhoto is selected and not some text program or the like.

  • Help with this requirement

    Hi Experts,
    i have a requirement: i have a customer table and fact table with contains operations performed by that customers. In cust table, there is a column name CUST_KIND with contains the kind of customer. This value can change, so i need to construct a report that shows that changes of customer kind. To achieve this, in the report, i create a new field with EVALUATE and LAG sentences to catch the value of CUST_KIND of previous row, and i order the report by cust_id and time. I have the problem that analytic function LAG can't be used in WHERE clause... so, how can i achieve my requirement??? Please, answer it ASAP
    Thanks in advance.

    Hi friend,
    thanks for response. The fact table contains operations performed by customers. One column of that fact table is 'kind of customer', and this is the field that can change. So, One customer can change of kind from one week to other, so, one week can perform operations being one kind of customer and next week can perform operations being other kind of cust. Because of that, i need to build a report that shows that changes of kind of customer, comparing cust kind of one week with cust kind of previous week.

  • Help with validating required fields

    I have approximately 50 columns in a result set. I need to find out if the required fields (20 out of those 50 columns are required fields) have values (not empty field).
    Since I'm dealing with a large result set (approximately 3000 to 5000 records), what is the most efficient thing to do to validate each field?
    For example:
    Column A, B,C,D.E.F, etc are required fields, I need to validate that each of these column has value otherwise I need to <CFABORT> the process and notify the user.

    The data is not yet in our database,they are created in memory when the app. is run.
    I have sort of  Xml To Query function that generates a result set. I'm doing some validation on req. fields before they are inserted into our DB.
    I try to run your code but I got an error:The value '' cannot be converted to a number
    Here is my code imitating yours (For testing I'm using fewer columns):
    <CFSET MandatoryFields = "Org,OrgId,LastName,FirstName,Gender,Address,City,State,Zip,Phone"> 
    <cfquery name="q1" dbtype="query"> 
    <cfloop list="#MandatoryFields#" index="ThisField"> 
    select Org, '#ThisField# null' problem 
    from ResutSet 
    where #ThisField# is null 
    union 
    </cfloop>
    select Campus, '' problem 
    from ResutSet 
    where 1 = 2 
    </cfquery>
    <cfabort>

  • Help with Designing a Simple Database

    I am currently working on a designing problem I would appreciate if someone could review my solution.
    The Problem:
    I need to create a simple database that contains the following entries�
    First Name //mandatory
    Last Name //mandatory
    Date of Birth //mandatory
    Hobbies //there could be anywhere from 0 to infinite amount of hobbies
    Type of actions that I need to perform on the database�
    Add, delete, and modify and entry
    Below are a two design solutions I came up with�
    For both solutions I am going to create two text files. One of the text files called profiles.txt will contain the following fields on each line�
    Id, First Name, Last Name, Date of Birth
    //the Id field in this text file will be the primary key so you will not see the Id duplicated
    The other text file called hobbies.txt will contain the following fields on each line�
    Id, hobby
    //the Id field can be duplicated in this text file so a person can be linked to zero or several hobbies
    Now what differs between my solutions is how I am going to read this data into my program�
    Solution 1) When you start the program it will read the profiles.txt into a linked list. After that is finished the program will then load the hobbies into several linked list that the profiles linked list will point to. So basically each person will have a linked list of hobbies associated with him or her.
    Problem I see with this solution is that if there were 200 million people contained in the profiles.txt would my program crash since the computer would not have enough memory to load all of those names?
    Solution 2) Instead of loading the data at the start of the program the data will stay in the text files. So when someone does a search it will open the text file and search for the entry.
    Problem with this solution is it would be hard to delete and modify names (would I have to rewrite the text file every time I do a change?). Would a good fix to this problem be creating a separate text file to keep track of any changes or deletions I do and once in a while do a database maintenance?
    So a review of my questions is�
    1)     Would my program crash if I had 200 million entries if I use my solution 1?
    2)     Is my solution 2 possible without being incredibly slow or complicated?
    3)     Is there another way of doing this I have not thought of?

    I think having one option will do. Now the problem with this text file thing is that, we'll hve to read every information into memory if we are running a test driver for the program and then work on the information in memory.
    After the program closes, whatever changes we made to this data in memory shd be written to file so we need to find a way of writing the data from memory to overwrite the file. I hope you kinda get what i'm talking abt.
    the database will consist of information like this
    String firstName
    String lastName
    String DOB
    ArrayList / Vector Hobbies
    Now, we kinda want to declare a class with with all these information as data fields ok.
    so let's say
    public class Try{
    String firstName
    String lastName
    String DOB
    ArrayList / Vector Hobbies
    and then create an instance of this class in the driver
    which will be an ArrayList of this class or something so each index of this class ArrayList will hve it's unique data information from the file we read in but again, this is kinda working in memory right.
    After doing all we have to do, we want to write back to file all the changes we made to the data in memory. That's where we are kinda stuck right now.
    A member of the group was suggesting we call whatever functions to work on the txt file which will mean we'll hve to re-write each time we call a function to operate on it and all that stuff. This is a slow process.
    will be glad if anybody out there will have a better way to implement this. Thanks a lot.

  • Need help with design with classes, etc...

    Hello Experts,
    I am currently doing a report which gets data from several tables then processing it and showing it
    via ALV. Now, I am kinda confused as to how to declare the classes meaning do I group
    all the fetching of data to 1 class(e.g. method 1 to get data from MARA, method 2 to get data from marc, etc)
    then create 1 class to process/combine the data and another class to display the data via ALV?
    for example:
    class data_definition abstract contains all the general data declarations
    class get_data contains methods for fetching data and inherits data_definition class.
    class process_data contains methods for combining and manipulation of data and inherits get_data class
    class display_data contains all the SALV classes and inherits data_definition class
    Please recommend a better option for my design.
    Thank you guys and take care!

    Hi,
    I think it really depends on approach you choose. You can leave the design as it is, or group it all in one class. As long as you are working on same data, it must be visible in all classes (which you achieved by defining data_definition class). Alternatively to this you could create an interface and each class could implement it, this way global data would stay visible in all classes. Only interface components addressing would change a litte bit. As for fetching and processing data you can write separate methods for it, get_ , set_ respectively. Anyhow, I think important is to have clear understanding what your class is responsible for, so that logically data contained in it create some encapsulated entity.
    Please also note that good practise for classes comunication would be using events instead of explicit call of public methods. You can consider that too. Also try to think the way as you would be comming back to this programm after a while. Is it clear for me enough? Do I understand exact purpose of each class, their methods? Do I have any data which are defined twice or three times (reduntant data)?
    I think such questions will lead you to the answer: "Yes my approach is the best one I chose", or, "I have to think about better OO desing before starting my coding".
    All in all it turns out that some things have to be changed during coding and sometimes it requires a small backward rebuilts.
    Regards
    Marcin

  • Help with Designing a Website Call to Action Background

    Hi there,
    This is my first post here, but I am having a bit of trouble designing a background call to action background for my website. My website is a common responsive 980px site but the problem is how I should go about designing a background that will properly adjust to the reponsive nature of the site.
    If you want to have a look at what I mean here is my site, Galactic FX,
    Any help would be greatly appreciated,
    Kieren Hovasapian.

    Mazza,
    Try this VI out. It returns a boolean instead of an integer, but this is really the same thing from what you are talking about.
    You would use this VI as a subVI. It will pop up and allow user data entry. It passes the boolean out of it to see if the login was successful or not. You could also change things so that the password comparison (password in my case) is an input to the subVI as well.
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask
    Attachments:
    Timed_login_panel.vi ‏29 KB

  • VLAN with PAT and 3 networks...I need help with design!

    I've been tasked with a major upgrade to my current network and internet access. 
    1.     I need to have an internal private network with access to the internet.  This will be for large meetings, and I'll use a private network with 2048 addresses.
    2.     I also will have a small publid network with 8 routable addresses for Firewall, Web Server, PAT (NAT overload) for the above Private network internet access.
    3.     I want to split a class C address into two networks to allow one network (128 addresses) for Guest use that need routable addresses, and a second network (the other 128 addresses) for specific meetings that also need routable addresses.
    I have:
    I have been issued a router from my ISP.  They have allocated me one .248 network with 8 addresses (6 usable) and a full class C network.
    A Cisco 1841 router with 2 FA ethernet ports.  I would like to use one FA port at the outside (to my ISP router) and the other FA port as my Inside port (to all other networks).  I will do NAT Overload.
    I also have a Layer 3 Catylist 3750 switch.
    Do I need to set up VLANs for each Network?
    Can I place my network hardware on the 10 network?
    Do I need router sub interfaces for my VLANs and can I PAT on a Subinterface?

    Hi Brian
    1. Do I need to set up VLANs for each Network?
    Create seperate VLANS for each subnet and do the intervlan routing on 3750
    2. Can I place my network hardware on the 10 network?
    Yes
    3. Do I need router sub interfaces for my VLANs and can I PAT on a Subinterface?
    Not required. You can do the intervlan routing on your Layer 3 3750 switch. From 3750 you can point a default-route to the router.
    On the router you can perform PAT based on an ACL. Also you need to add Static NAT for your Webserver etc
    Thank you
    Raju

  • New here and need help with design

    Hello all, I am working on my son's first birthday thank you cards.  I need help removing the line in between the blue and green background.  Thanks. Stacey

    You also have a narrow black line on the lower left side.
    Increase the the magnification to 500% and select the black and the white lines with the Magic Wand (Continuous checked).  Feather by one pixel.  Sample the green right under the white line, make it the Foreground Color and fill the selection with it.
    Juergen

Maybe you are looking for

  • Open WORD docs question....

    I have iWorks 09 and Microsoft Office 2004 on my MacBook. When someone emails me a Word Doc and I open it, the doc opens in Pages, not Word. Yet when I receive an Excel or Powerpoint, these open in the original format. What do I need to do to have Wo

  • Peripherals = fan noise?

    i'm going to post this in a couple areas since it doesn't apply to just displays. i have the last revision (D) 12" PB and have been thinking about switching to the macbook for some time. one problem i had with my pb was that the fan came on a lot whe

  • Which Design Pattern and how to design using OOP this scenario

    I am having trouble designing a module, can anybody help me? Because it will be hard to maintain this kind of module, I also think that this can test my skill of design pattern usage. Requirement This is basically an agricultural project (web applica

  • Counter reading reset-Ik11

    Hi, I want to put a check on Counter reading entry,since people are entering wrong data compare to last measuring reading. so every time counter is getting reset. so we need put a condition,only incremental value should allow in Counter reading field

  • Looking for a camera with no shutter lag!

    Currently I have a KODAK normal everyday digital camera...  Since I had my son, I have been very aggravated with this camera due to the shutter lag.  By the time I press the button, in the 5 second delay, my son has already turned his head and all I