[Design of JBoss Web Services] - Re: WSContractConsumer API in a seam app
by jason.greene@jboss.com
"maeste" wrote : Ops, something went wrong in my last post and the final part of my message doesn't be visible:
| "jason.greene(a)jboss.com" wrote :
| |
| | Be careful when replacing the context loader when running in a container. If you do this you should restore the original thread context loader.
| |
| | -Jason
| I suspected it is too aggressive. What is the best way to tell the current class loader to include also my generated client class?
|
| Many many tanks for your time
You don't actually need to mess with the context classloader. Once a class is loaded you can freely pass the class reference around. The JVM associates the class reference to the loader that loaded it, and that loader is preserved until all class references are garbage collected. The only scenario to replace a context loader is if you are using an API that uses it, and doesnt offer a mechanism to pass the loader directly. However, when you do this you must use a try finally block that restores the context loader to the original version.
So, your problems might go away if remove the context loader assignment, and the RMIAdaptor hack.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022553#4022553
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022553
17 years, 8 months
[Design of JBoss jBPM] - Re: various questions
by gavin.king@jboss.com
I'm really happy to see this discussion. I've been asking for this for a while now, so its good to see it might actually happen.
The thing is that, from a pure *data modelling* perspective (forget jBPM, forget usecases, forget Hibernate), all tables should have unique natural keys, as well as the surrogate key that is used for maintaining relationships. Otherwise, the table is not a proper relation. (It does not represent a set of things.)
Tom is totally wrong to suggest that this is a limitation of JPA/Hibernate (he needs to read Hibernate in Action where this is discussed carefully). You simply can't use a surrogate key for equals(), it can't possibly work, and it doesn't make sense anyway from a user point of view.
And, of course, anytime you don't have a natural key, it becomes waaay more difficult to find the data you are looking for (the surrogate key is meaningless to the user).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022533#4022533
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022533
17 years, 8 months
[Design of JCA on JBoss] - Re: JBAS-1437 RARMetaDataRepository
by weston.price@jboss.com
The parsing of the *-ds.xml file is not trivial as the format has been butchered through the years to include things that probably should have never been allowed and no one ever seemed to draw a line in the sand to make people stop.
Using AOP for the parsing of the *-ds.xml format would seem to make some sense for a few reasons
a) Element name definitions can be injected into the parsing aspects rather than being hardcoded. By element name defintions, I mean the actual mapping of things like <min-pool-size>, <driver-class>. Anyway you look at it, the elements from the DTD have to be mapped somehow, someway to something.
Before you say it, I know that this can be done via simple MC injection or can simply be thrown it in a properties file for reference, but this just doesn't seem to me to be the best approach. I could be wrong.
b)As new elements get added to the *-ds.xml (see above), new aspects can just be added to support this. Also, new file formats can be accomodated via aspects since there would be no real behavior in the actual class itself.
anonymous wrote :
| The correct approach is
| xml -> metadata model
| metadata model -> components (jmx/pojo)
|
Right, and as long as the appropriate MetaData gets generated from the *-ds.xml, I don't see there being a *wrong* approach. Ideally I would have liked to use some form of DataBinding to do the unmarshalling rather than doing the parsing by hand. However, I wanted to keep my dependencies to a minimum as well as put an end (at least in my stuff) to the JAXB, JBossXB debate which never did seem to get resolved.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022475#4022475
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022475
17 years, 8 months