[Design of JBossCache] - Re: static field replication in PojoCache
by genman
Why are 4 and 5 even good ideas, let alone "requirements"?
As a user, I would want to specify where the static variable is stored and how and if it is replicated. The "registerClass" would essentially link a class to the cache. A class would have to belong to a single cache.
To be fair, I'm not really involved with this feature at all. I'm not the customer. But here are what I believe are "requirements":
1. User needs to be able to specify which PojoCache they are replicating their object with. This is becaues it's a common use case to have multiple PojoCache instances per JVM.
2. User needs to be able to control (turn on/off) replication of the static fields. It needs to be off by default. This is because they might want to use this object in a situation where they aren't using JBossCache, e.g. on a simple client without JBoss Cache.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985110#3985110
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985110
19 years, 5 months
[Design of EJB 3.0] - List<T> and @OneToMany relationships in EJB 3.0
by dkoslu@cleartalk.net
With EJB 3.0 I am trying to persist classes that use Lists (ie, an order preserving collection) using a "JoinTable".
Eg, I want a class A to contain a list of instances of class B:
class A {
List< B> list;
}
class B {
//whatever
}
If I specify a @OneToMany annotation on "list", then the generated schema is 3 tables: A, B, and A_B where A_B has 2 columns: a (non-unique) foreign key reference to A, and a foreign key reference to B.
This is fine for Collections of course but how is the list ordering preserved? I would expect a 3rd column called "position" or "index" to sort on.
I tried it with JBoss and the packaged HSQL database using a @OneToMany annotation (with defaults), and my simple tests seemed to work, that is, list order was preserved.
But I suspect the only reason that it worked is because JBoss is relying on the database to retrieve the rows in the same order it persists them, which is a bad assumption. I think the SQL standard says you can not rely on any particular ordering in a general select statement.
At least I don't see how else it works.
Is this the case?
I saw a very old post (2004) by Bill Burke that said JBoss's EJB3 doesn't support Lists yet, but I also read in his new EJB 3.0 book that it does.
I'm afraid to rely on Lists persisting/retrieving correctly.
Perhaps there is a way I can manually specify a sort column in the join table through @JoinTable or some other annotations..?
I can also resort to manually adding and maintaining a sortable "index" field to class B, and using @OrderBy, but that is not always practical (nor correct).
thanks -dk
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985095#3985095
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985095
19 years, 5 months
[Design of JBoss ESB] - Re: JMS Provider(s) Design - JBossMQ/JBossMessaging/ActiveMQ
by kurt.stam@jboss.com
anonymous wrote : Yes, that is a bad idea as even for a given jms pvoider we potentially need alternate configurations.
OK in that case we will have to make it configurable.
anonymous wrote : Also, what is the relationship between this configuration object and the service that binds the jms connection factories? I assume it can be a jca deployment, mbean, etc.
As is typical for ESBs, this release does not support transactions (in the real world most transports will use files, email, ftp etc). For the time being we use plain JMS, no JCA and/or mbeans. However I'm pretty sure we want to be transactional in the (near?) future. So future release will need JCA for sure. But this is more of a Mark question, I'm sure he will comment on this later this weekend.
anonymous wrote : There are some instructions on the wiki
Thanks Arvinder, that's a good place for it. (I was going off the email string). I will add to this page as I go.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985083#3985083
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985083
19 years, 5 months
[Design of JBoss Web Services] - Re: JSR-181 Annotation Based UDDI Registration
by jgilbert
That worked!!! This little experiment wasn't so little after all.
Based on my prototyping this is what I would refactor:
juddi-service.sar
- remove org.apache.juddi.registry.RegistryServlet. it is there just to init the juddi engine
- instead, init and expose the engine in org.jboss.jaxr.juddi.JUDDIService
- change org.jboss.jaxr.juddi.JUDDIServlet to access the engine from the mbean
- refactor non-httpservlet related code from org.jboss.jaxr.juddi.JUDDIServlet into a pojo called something like UddiSoapProcessor
- create a LocalTransport class that extends SaajTransport but calls UddiSoapProcessor instead of invoking a SOAPConnection
- add a new mbean that implements the logic in the UDDIExample
- add the ddl from the UDDIExample to the standard script
jbossws.sar
- deploy as an expanded sar
- add commented out JaxrSubDeployerInterceptors to jboss-service.xml
- the JaxrSubDeployerInterceptors would be configured with the desired transport : Local or Saaj
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985077#3985077
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985077
19 years, 5 months