[jboss-user] [JBossCache] - Minimizing POJOCache impact on existing codebases
gregory.pierce@jboss.com
do-not-reply at jboss.com
Mon Sep 11 17:34:55 EDT 2006
Okay so I've gone through the examples and they contain nothing useful for the use case that I'm trying to build. I don't want to use aopc - EVER. How do I configure JBossCache to take POJOs in a regular application where I have created a cache without having to tie my build process to JBossCache?
This documentation does not talk about adding objects at runtime to a cache:
http://labs.jboss.com/file-access/default/members/jbosscache/freezone/docs/1.4.0/TreeCache/en/html_single/index.html
I've seen references to PropertyConfigurator not needing to be defined as it will take defaults. What are the defaults? If I'm annotating a POJO, what else do I need to do to get it into the cache? The examples do not specify this without immediately falling into a variety of PropertyConfigurator information. If PropertyConfigurator setup required in order for us to get this stuff to use annotated POJOs?
| package org.jboss.labs.jbosscache.model;
|
|
| @org.jboss.cache.aop.annotation.PojoCacheable
| public class Person
| {
| private String firstName;
| private String lastName;
| private Address address;
|
| public String getFirstName()
| {
| return firstName;
| }
|
| public void setFirstName(String firstName)
| {
| this.firstName = firstName;
| }
|
| public String getLastName()
| {
| return lastName;
| }
|
| public void setLastName(String lastName)
| {
| this.lastName = lastName;
| }
|
| public Address getAddress()
| {
| return address;
| }
|
| public void setAddress(Address address)
| {
| this.address = address;
| }
| }
|
If its not as simple as putting this annotation there and running my application, why isn't it this simple or for that matter - why do I have to EVER annotate my POJOs at all?
>From what I can tell we either have to use a special classloader so that JBC can bootstrap the classes properly, create an aop file to define a pointcut and annotate an object.
Is there no approach where we can:
1) Not use a custom classloader
2) Have JBC annotate an entire object without having to go through the codebase and add annotations to everything (JBC can add/detect this annotation at runtime)
3) Not use aopc
At the very least we shouldn't have to annotate the pojo. If you get a pojo and you can't treat it in an AOP manner wouldn't it be better to fallback to treecache as opposed to exploding with the fury of a stracktrace?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970840#3970840
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970840
More information about the jboss-user
mailing list