[JBoss AOP Development] New message: "Re: Help: Error [Instrumentor] AOP Instrumentor failed"
by dfsdf asdas
User development,
A new message was posted in the thread "Help: Error [Instrumentor] AOP Instrumentor failed":
http://community.jboss.org/message/524393#524393
Author : dfsdf asdas
Profile : http://community.jboss.org/people/cuccu83
Message:
--------------------------------------------------------------
I have one question...
In my DemoAspect.class i have that part of code:
.
.
.
if (arg[0] instanceof MessageContext)
{
MessageContext msg = (MessageContext)arg[0];
info.append("\nMessageEnvelope :" + msg.getEnvelope().toString());
}
.
.
.
MessageContext.Class is argument's type that i want change and it is in a jar file contained under *riftsaw.sar/bpel.war/WEB-INF/lib*
while my AOP dir is under *riftsaw.sar/demo.aop*
When try to invoke a service i obtain a ClassLoaderNotFoundException throws by DemoAspect.class because MessageContext class is not found.
Is possible to specify a jar path ? If yes...where?
Or i must follow another strategy?
Thanks
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524393#524393
16 years, 5 months
[EJB 3.0] New message: "Replacing *.hbm.xml files with @Annotations."
by Jan Erik Robertsen
User development,
A new message was posted in the thread "Replacing *.hbm.xml files with @Annotations.":
http://community.jboss.org/message/524389#524389
Author : Jan Erik Robertsen
Profile : http://community.jboss.org/people/janerikrob
Message:
--------------------------------------------------------------
I have three java classes that are persisted using hibernate. I want to switch from using *.hbm.xml files to annotations on these classes. However the db has additional tables that are created by tags in hbm.xml. Is there a way to create these extra tables using annotations without having to create additional java classes.
One of the java classes that result in two tables in db:
public class Attribute {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private Long id;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private String name;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private String value;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private VocabularyElement parent;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// This map will result in its own table using the hbm.xml file listed below.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// What annotations can I use instead of the hbm.xml file?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private Map<String, String> extensionAttributes = new HashMap<String, String>();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Constructors, getters, setters&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// ...}
hbm.xml file for the Attribute class:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE hibernate-mapping PUBLIC &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-//Hibernate/Hibernate Mapping DTD 3.0//EN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http://hibernate...><hibernate-mapping>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<class name="com.tracetracker.mds.adm.domain.Attribute">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<id name="id" access="field">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<generator class="native"></generator>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</id>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<natural-id>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<property name="name" access="field"></property>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<many-to-one name="parent" class="com.tracetracker.mds.adm.domain.VocabularyElement"></many-to-one>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</natural-id>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<property name="value" type="text"></property>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!-- This tag creates the extra table. -->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<map name="extensionAttributes" table="Attribute_Attr" order-by="attr_name asc" lazy="false" access="field">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<key column="id"></key>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<map-key column="attr_name" type="string"></map-key>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<element column="attr_value" type="string"></element>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</map>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</class></hibernate-mapping>
The resulting sql script:
create table Attribute (&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id int8 not null,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name varchar(255) not null,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value text,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent int8 not null,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;primary key (id),&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unique (name, parent));create table Attribute_Attr (&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id int8 not null,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attr_name varchar(255) not null,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attr_value varchar(255),&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;primary key (attr_name, id));alter table Attribute add constraint FK7839CA7C7FB02B5A foreign key (parent) references VocabularyElement;alter table Attribute_Attr add constraint FK4F4769F4A36A3D31 foreign key (id) references Attribute;
Any help is much apprecated.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524389#524389
16 years, 5 months
[JBoss Microcontainer Development] New message: "Re: Modules with null ClassLoaders"
by Kabir Khan
User development,
A new message was posted in the thread "Modules with null ClassLoaders":
http://community.jboss.org/message/524382#524382
Author : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com
Message:
--------------------------------------------------------------
> mailto:flavia.rainone@jboss.com wrote:
>
> > mailto:flavia.rainone@jboss.com wrote:
> > I'll try skipping the registration of such modules to see if any test breaks. Does anybody has a better idea on how to fix this?
> That didn't break of the tests. Thinking again, it makes a lot of sense to skip the registration of such modules. Given that the newly created class pool will be mapped to a null class loader, it is useless. We are just generating overhead that way.
> Now I wonder which scenarios registerBootstrapLoaders is really needed for.
That was probably just me fumbling in the dark :-) If some of them are not null, the purpose is probably to register those. Or are all of them null? I'm not familiar enough with the classloading/Module stuff to really know why the modules would have null classloaders
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524382#524382
16 years, 5 months