[JBossCache] - Minimizing POJOCache impact on existing codebases
by gregory.pierce@jboss.com
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/doc...
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
19 years, 7 months
[JBoss Seam] - Re: Scope/Context feedback
by CptnKirk
The given Seam examples and documentation isn't PhD work, or even that complex. It does try and provide a complete example (non-trivial) and it does assume a certain foundation.
In the case of your team, can I suggest some training. At least on JSF and Hibernate/JPA and then sprinkle in some EJB3 and Seam if available. I believe that JBoss offers training on all of these technologes. I have also had great experience with training from ArcMind. You should be able to get up to speed in about a week. The development team at my organization made a previous technology leap to the one you're making, and let me say that a week of on-site training (available for around $10-15k depending on size) was money very well spent.
>From there I'd start learning how Seam improves upon what's currently available in the JSF/EJB3/JPA technology stack.
You'll see that @Factory and @Unwrap are not magic. And you'll see how Seam can allow for a tremendious line of code reduction vs alternative best practice uses of JSF/EJB3/JPA. In the end this should allow for much easier code readability and smaller modules. Which all equals fewer calls on vacation.
I and others are always willing to help here on the forums, but to get the most of out what we're saying about Seam I think training in other areas would go a long way. At the very least you'd no longer be trying to learn 5 things at once, and could focus on doing Seam well.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970835#3970835
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970835
19 years, 7 months