Ramen Chatterjee

Ranch Hand
+ Follow
since Apr 27, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ramen Chatterjee

Hi

What is it you are trying to achieve?

Assuming you have a fixed set of images. Then you would be better storing these on the file system, and have your (caching) web-server/application server serve them based on a dynamically generated path - it'll be quicker and more efficient. So your jsp, or something similar will build up the img tag path to point to the image required at that time.

Even if you are generating images that only exist for a user's session, it is still probably a bad idea to store them in the session as it will make your session graphs potentially big, could cause problems with synchronised sessions in a clustered environment, performance issues where sessions are written to and from file, etc. It would be better to store them on the file system in a temporary file. Dont forget to clean-up if they become invalid.

Hope this helps

Ramen
13 years ago
I know this has been resolved, but you may also wish to consider using a scheduling framework like Quartz to generate your content.

Regards

Ramen
14 years ago
Hi

A business requirement defines something that must be realised to achieve a business goal.Business requirements do not and should not always be realised in a system.

Functional requirements define the behaviour in a system, used to realise a business requirement.

Ramen
[ June 06, 2007: Message edited by: Ramen Chatterjee ]
Hi

I dont think this works, and I bet it's not thread safe.

Singletons are tricky. You should know why you want a singleton and how it is used (per JVM, per cluster, per ???). Is this to manage some globale resource, or to prevent unneccessary objects with no internal state?

Those discussions beside, look at the discussions in the following links for a better understanding of the issues.

Ramen

JGuru
Sun Java forum
Hi

There are lotes of different kinds of server (anything that responds to a client). But what I think you want to know is this:

  • Web server - think Apache servers up web content (HTML, etc) and can be extended with plugins (CGI, PHP, etc.)
  • Servlet Container - e.g. Tomcat, hosts servlets/jsps and used to serve dynamic content (usually to http clients)
  • EJB container - Used to host EJBs and can serve many clients.
  • Application server - Weblogic, Websphere, Glassfish, JBoss, etc. Typically consists of a web server, servlet container and EJB container. Often provides other stuff as well.


  • Depending on your needs, you would use some or all of the servers available. If you only have static content, then a web server will do. You can often implement all of an application using JSP/Servlets (and maybe a web server upfront). Occasionally, you will have a large scale, transactional system and you could use an EJB container (probably with the other servers as well).

    Hope this clears things up

    Ramen
    Hi

    Please take time to do a quick google. Its actually quicker than posting! Anyway I guess youe are using J2SE1.5 - Google your error, and if you are still stuck look at generics

    Regards

    Ramen
    17 years ago
    Hi

    You will need to import both (using package wildcards or fully qualified names), and then use the fully qualifed name when you declare/initialise your variables.

    HTH

    Ramen
    17 years ago
    Hi

    You need to think about what the access modifiers (like private) mean. Why are these a good idea, when might you want to use them? You should also check out the behaviour when it comes to inheritance.

    Often, people talk about making class members private, to force access through methods. This serves 2 purposes - as the author of the access method(s), you can add rules, validation, etc., you can also protect the user of the method from the actual type you use to store the data in (this means you could change the member type without affecting callers. A godd example would be the Collections classes. Do you know (or care) if the underlying store is an array, or some other object?

    So thats a good reason for things being private, but there are times when that wouldn't make sense - Math.PI will always be the same value so thers no point hiding it!

    Lastly, if you dont want your member to change, make it final and intialise it before anyone else can.

    hope this helps

    Ramen
    17 years ago
    Hi

    Not tried t myself but I think you could try java.text.DecimalFormat.parse(String).

    Regards

    Ramen
    17 years ago
    Hi

    Just to add to those comments already made. If you are overriding the equals method, you should meet the contract specified in the API documentation for java.lang.Object. If there are other meaningful tests for equality include those. This is most common in data objects

    For example an employee object using the equals method from Object would only return true if 2 instances they referred to the same object. It would be preferrable to have equals return true of the instances referred to the same employee (one test may be equality on the NI/social securtiy number, or maybe the employee number, etc).

    Josh Bloch's excellent book Effective Java Programming covers this and other rules.

    Hope this helps

    Ramen
    17 years ago
    Hi

    When posting code please use the code tags. This will preserve formatting and make it easier to read. I suggest you take a closer look at Stan's posting, then at your code. The compiler will tell you roughly where the problem occurred. If you are still stuck then, come back.

    Regards

    Ramen
    [ September 11, 2006: Message edited by: Ramen Chatterjee ]
    17 years ago
    Alec

    Perhaps you could describe what the client is asking for. The point being, why should a client want disparate information all one call? In the example you give, if it is reasonalbe for the client to have all this data, why not pass the args String[] and let the client do the conversion?

    Describe your problem in more general terms and it may help find the correct solution. Alternatively post some code, so we can see what you are trying to do.

    Regards

    Ramen
    17 years ago
    Hi

    Just to clariy..

    .. 1>stdout.txt 2>err.txt

    First part means redirect std out to file
    Second part means redirect std error to file

    BTW, if these are servlets why not use the log() method?

    Regards

    Ramen
    17 years ago
    Hi Ranchers

    Sorry to cover old ground, but I couldnt see any specific answer.

    I have 2 Win XP pro machines (pc and laptop). Ultimately, I wish to invoke a web service running in oc4j 10.1.2 on machine A, that will delegate to a RMI client that will invoke a RMI server running in Tomcat 5 on machine B.

    I have written an RMI server and RMI client. I run the RMI Server (machine B) on my pc. I can then invoke the service running the client as a standalone. Both are using a blanket 'anything goes' security policy. I see output at both ends - so far so good.

    I next generated a web service from the RMI client using JDeveloper. I deployed the web service to oc4j running on machine A. The web service deploys fine, and I can invoke the service using the supplied oc4j forms. However, I get a java.rmi.ConnectException when doing the Naming.lookup() call.

    FYI, I have overidden RMISecurityManager, although I am not sure this is the best approach. Below is what I believe to be the pertinent code. I presume this is a configuration issue but cant think what. Thank you all in adavnce for your help

    Ramen


    [ August 09, 2006: Message edited by: Ramen Chatterjee ]
    17 years ago
    Hi

    Ive been following this thread. It would certainly help (me at least) if you could describe the problem in terms of the 'real world'. That is, you are trying to solve a problem (the why) and have mentioned one (potential) way of solving that problem (the how). If you could describe 'the why' a bit more, it may help answer your problem.

    Regards

    Ramen
    17 years ago