Search:

Type: Posts; User: Sreeram Ediga; Keyword(s):

Search: Search took 0.03 seconds.

  1. Replies
    5
    Views
    1,184

    Glad that you liked the solution.

    Yep. You are spot on. ;)

    Only thing is if you are having a requirement to configure in multiple files (leading to multiple bean factories/containers) then you may have to consider the method...
  2. Replies
    5
    Views
    1,184

    Hi, BeanFactory and ApplicationContext are the...

    Hi,

    BeanFactory and ApplicationContext are the only two legal ways of getting a bean instance based on the bean definition defined in the configuration file.

    This is the only code present in a...
  3. Thanks Marten. However, my query is - if I...

    Thanks Marten.

    However, my query is - if I want my class to be treated as Pure Singleton in its purest sense - only one shared instance irrespective of bean definitions, containers etc at any cost...
  4. struts+hibernate+spring

    Hi,

    Not sure if your question is specific to the example present in the provided URL of roseindia.net OR is it a generic question.

    However, the layers/frameworks are quite generic if you are...
  5. Try this.

    Hi Mellon,

    InputStream is = new BufferedInputStream(
    this.getClass().
    getClassLoader().
    ...
  6. Use "update".

    Hi Henry,

    If this is what you want to do at the starting of your web application -->
    a) tables not existing to get created
    b) populate some rows in tables

    If you are using...
  7. Replies
    1
    Views
    705

    hashCode() implementation?

    Hi Aju,

    Can you provide the hashCode() implementation present in your bean?
    It is possible to have multiple instances of same class to have same hash code.

    For example --->

    ...
  8. Private Constructor not "private" anymore in Spring POJOs?

    Hi,

    I had marked my constructor as PRIVATE with the intention of making my class as Singleton. I have provided a static factory method that will return back the Singleton instance. Whenever, in...
  9. What are the legal ways of having properties in a Java Bean?

    Hi,

    I thought a property is found out by IoC container using reflection mechanism, that looks for a pair of get and set methods.

    However, I noticed the following -->

    1. Even if there is no...
  10. Thanks, Pedro. So, it implies that the no-arg...

    Thanks, Pedro.

    So, it implies that the no-arg constructor will be called for creating java.util.Date instance.

    Suppose, I want java.util.Calendar instance created using the getInstance() method...
  11. Thanks, Pedro. It would be great if you can...

    Thanks, Pedro.

    It would be great if you can tell about the special configuration that can make a different prototype bean to be existing in the same singleton bean.
  12. Inner beans are scoped by default "prototype"?

    Hi,

    In Page 48 of "Spring-Reference.pdf" (2.5.5 version), the following point is present with respect to Inner Beans -->

    "Note that in the specific case of inner beans, the 'scope' flag and any...
  13. Hi, One possible solution --> 1. Declare...

    Hi,

    One possible solution -->

    1. Declare all the three beans' scope as "prototype".

    2. In your code that requires these bean instances,
    a) do a getBean on "acct"
    b) do a...
  14. Just to add on --> I want to assign today's...

    Just to add on -->

    I want to assign today's date through DI.
  15. How to dependency inject properties that have Java objects associated to them?

    Hi,

    I have a class called Person, which has Name (String), Address (String), dateOfBirth (java.util.Calendar) properties.

    I want to set values for these members through dependency injection.
    ...
  16. Hi, Things that might help you regarding Inner...

    Hi,

    Things that might help you regarding Inner beans -->

    1. Inner beans are always anonymous
    2. The 'scope' flag and any 'id' or 'name' attribute are effectively ignored.

    Thanks,
    Sreeram
  17. Unable to retrieve multiple domain objects.

    Hi,

    Using JdbcTemplate I am trying to retrieve the domain model object using queryForObject() and query() methods.

    I am using Oracle 9.2 version. I have attached all the necessary code for...
  18. Poll: Missing diagram in Appendix as specified in documentation.

    Hi,

    In Page 70 of spring-reference.pdf (I have 2.5.5 version), the following line is present : "In one of the appendices, you can find diagrams that show how Spring manages beans, how those...
Results 1 to 18 of 18