[JBossCache] - Re: Object is not replicated after field update
by FredrikJ
As a note I finally got it working by adding the arguments:
-javaagent:lib/jboss-aop-jdk50.jar -Djboss.aop.path=src/conf/META-INF/pojocache-aop.xml
and copying the pojocache-aop.xml from the distribution /resources.
I must say, I do find the documentation for this rather... confusing. It is not as concise at it could be anyway.
I have one question though, in the documentation it states that you can either precompile classes or runtime by using a special system classloader. But in section 7 it says:
anonymous wrote :
| 7.3.1. Ant target for running load-time instrumentation using specialized class loader
|
| In JDK5.0, you can use the javaagent option that does not require a separate Classloader. Here are the ant snippet from one-test-pojo, for example.
So... if I use this, do I still subsitute the system classloader or not?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048832#4048832
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048832
18 years, 11 months
[Persistence, JBoss/CMP, Hibernate, Database] - Re: Hibernate and XML persistence implementation
by pattchen
Thanks for your answer Andy,
I've explored documentation about Hibernate and XML.It seems that I must open a database session before open a DOM4J session. Moreover,It is not possible to retrieve objects from an xml storage.
Here is an example of what i want to achieve:
/**XMLSession is an imaginary class(or interface) which is used to manipulate an xml doc.
| The factory is configured in properties file where we specify the xml file to handle.Just like we specify database parameters in hibernate.properties
| */
|
| //Store an object to an XML file
| XMLSession xmlSess = factory.getSession();
| Employee e = new Employee();
| e.setName("Andy");
| e.setAge(25); //too much or too low?? :-)
| Employee e1 = new Employee();
| e1.setName("King");
| e1.setAge(35); //too much or too low?? :-)
|
| Company c = new Company ();
| c.setName("Future Software");
| c.setLocation("Cameroon");
| c.add(e);
| c.add(e1);
|
| xmlSess.store(c);//persist company object and his employees
|
| //Retrieve an object and update it
| Employee who = xmlSess.load(Employee.class, 1);//1=id
| who.setAge(30);
| xmlSess.update(who);
|
| xmlSess.close();//certainly release i/o resource??
So,I just want to replace database persistence by an xml file and create a mapping file between classes and the xml schema.
Is it possible with Hibernate? if not,is there another solution out there?
Thanks again.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048831#4048831
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048831
18 years, 11 months
[JBoss Seam] - Re: Simplest <s:fileUpload> usage
by shane.bryzak@jboss.com
"evl123" wrote :
| From my code snippets, can you tell what I did wrong that resulted in null injection of org.apache.myfaces.custom.fileupload.UploadedFile component?
| Could it be some incompatible issue in the jar files - tomahawk-1.1.5, commons-fileupload-1.1.jar, and commons-io-1.2.jar?
| I tried switch to tomahawk (1.1.1) but it did not change the outcome. It would be very nice to see UploadedFile created so the file attributes like file name, type, etc. would be available.
| Please shed some light - Thanks.
|
We recommend that you don't use the Tomahawk components. If you use the file upload control provided by Seam then you get all the things you mentioned (file name, content type, etc).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048820#4048820
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048820
18 years, 11 months