[Installation, Configuration & DEPLOYMENT] - Re: Upgrading hibernate in JBoss 4.2.2.GA
by jinpsu
OK, I can't seem to get this working. I'm clearly doing something wrong. Essentially, I want my ear application to use hibernate v3.2.6. Here is the structure of my ear (containing the upgraded hibernate):
| myEar
| |-- META-INF
| | |-- application.xml
| | |-- jboss-app.xml
| | `-- MANIFEST.MF
| |-- lib
| | |-- hibernate-annotations.jar
| | |-- hibernate-commonds-annotations.jar
| | |-- hibernate-entitymanager.jar
| | `-- hibernate3.jar
| |-- myEjb.jar
| `-- myWar.war
|
My jboss-app.xml looks like this (does the contents of "org.myOrg" or "myEarLoader" make a difference here?):
| <jboss-app>
| <loader-repository>
| org.myOrg:archive=myEarLoader
| <loader-repository-config>
| java2ParentDelegation=false
| </loader-repository-config>
| </loader-repository>
| </jboss-app>
|
The MANIFEST.MF of my myEjb.jar includes all the hibernate jars in the Class-path:
| Manifest-Version: 1.0
| Class-Path: lib/hibernate-annotations.jar
| lib/hibernate-commons-annotations.jar
| lib/hibernate-entitymanager.jar
| lib/hibernate3.jar
|
The ejb just starts a jboss service bean and prints out the current hibernate version. No matter how much tinkering I do, I always see this:
| [STDOUT] Hibernate Version: 3.2.4.sp1
| [STDOUT] Hibernate Annotations Version: 3.2.1.GA
| [STDOUT] Hibernate EM Version: 3.2.1.GA
|
What am I missing?
thanks.
justin.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170422#4170422
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170422
17 years, 11 months
[EJB 3.0] - EJB3 transaction propagation
by rphadnis
Hello,
I need help with transactions in EJB3.
I have an EJB which is called at a regular frequency using a timer. The EJB has a method with the @Timeout annotation. The method also specifies the REQUIRES_NEW transaction attribute. In this method, I am retrieving a list of records from the database. For each record, I am calling another method (update) in the same bean to update that record. The update method also specifies REQUIRES_NEW transaction attribute.
What I want to know is, if the updating of all the records takes more time than the transaction time out specified in the jboss configuration, will the update of all records be rolled back ?
What seems to be happening is the list is long and it takes more than 300 seconds to do the update of all records. Once that happens none of the records get updated. But I thought by adding the TransactionAttributeType.REQUIRES_NEW attribute on the update method,
I am trying to specify that each record should be updated in a separate transaction.
Here is some pseudo code:
| @Timeout
| @TransactionAttribute(value = TransactionAttributeType.REQUIRES_NEW)
| public void updateList(Timer timer) {
| List<Record> list = getRecords();
| for (Record r : list) {
| update(r);
| }
| logger.log("done");
| }
|
| @TransactionAttribute(value = TransactionAttributeType.REQUIRES_NEW)
| private void update(Record r) {
| //call another webservice to get update data
| // set updated fields in record
| //call merge on the injected RecordDA
| recordDA.merge(r);
| }
|
|
Please help.
Rahul Phadnis
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170416#4170416
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170416
17 years, 11 months
[Javassist user questions] - NullPointerException at javassist.bytecode.annotation.ArrayM
by theyurinator
Hello,
I am getting a NullPointerException somewhere beyond my control.
Here is my code
ClassPool pool = ClassPool.getDefault();
| CtClass cc = pool.makeClass(class_name);
| cc.stopPruning(true);
| ClassFile cf = cc.getClassFile();
| ConstPool cp = cf.getConstPool();
|
| try {
| CtClass persistent_class = pool.get("net.sourceforge.pbeans.annotations.PersistentClass");
|
| Annotation a = new Annotation(cp, persistent_class);
| a.addMemberValue("table", new StringMemberValue(class_name, cp));
| a.addMemberValue("audoIncrement", new BooleanMemberValue(true, cp));
|
| AnnotationsAttribute attr = new AnnotationsAttribute(cp, AnnotationsAttribute.visibleTag);
| attr.setAnnotation(a);
|
| cf.addAttribute(attr);
| cf.setVersionToJava5();
| }
| catch (NotFoundException e1) { e1.printStackTrace(); }
and this is the stack trace
Exception in thread "main" java.lang.NullPointerException
at javassist.bytecode.annotation.ArrayMemberValue.write(ArrayMemberValue.java:132)
at javassist.bytecode.annotation.Annotation.write(Annotation.java:303)
at javassist.bytecode.AnnotationsAttribute.setAnnotations(AnnotationsAttribute.java:246)
at javassist.bytecode.AnnotationsAttribute.setAnnotation(AnnotationsAttribute.java:265)
at com.....PBeanGenerator.generatePBean(PBeanGenerator.java:61)
at com.....PBeanGenerator.main(PBeanGenerator.java:145)
I have not added an ArrayMemberValue so I'm confused why I'm getting a null pointer there. Am I missing something?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170410#4170410
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170410
17 years, 11 months
Delivery Notification <buhgalteria@isc.chubu.ac.jp>
by Postmaster@lists.jboss.org
This is a delivery status notification, automatically generated by MTA mail.isc.chubu.ac.jp on Thu, 14 Aug 2008 03:46:53 +0900
Regarding recipient(s) : buhgalteria(a)isc.chubu.ac.jp
Delivery status : Failed. Message could not be delivered to domain <isc.chubu.ac.jp> .Failed while initiating the protocol. <[('buhgalteria(a)isc.chubu.ac.jp', 550, '<buhgalteria(a)isc.chubu.ac.jp>: Recipient address rejected: User unknown in local recipient table')]>
MTA Response :550
The original message headers are included as attachment.
17 years, 11 months
[JBoss Portal] - Re: Url : how to define MyPortal as the default portal.
by Antoine_h
Hello Etienne,
I think it's somewhere in the forum but you can figure it out...
hem, joking...
For what I remember, the default portal object configuration in the xml ... is only for the default page of a portal. but not the default portal.
to change the default portal, you have to modify one of the JMX Service of the portal.
See my post above, of Wed Mar 21, 2007 (that's why my "I think it's somewhere in ...")
it explain how to do it, and see the JIRA about it
https://jira.jboss.org/jira/browse/JBPORTAL-1324
There, you'll find the code for modify the JMX service.
it is a very simple modification of the JMX (overriding the class).
Then, you just have to comment the original JMX Service in the jboss-service.xml file of the portal, and deploy your own Sar with your service (with the same name). The portal will use your service.
I use JBP 2.6.1GA, and the modification of the portal code it is not yet there. May be it is in 2.6.5.
I will reopen the Jira so this thing can be done in a future version...
feel free to call me on the phone, me via my signature info, if you need more details or talking about it.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170406#4170406
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170406
17 years, 11 months