[Design of JBoss Serialization] - Re: Does JBossSerialization improves performance for Entrnai
by kumar_iitm
As the DataOutputStream also writes the primitives by converting them into bytes and writing the bytes into stream, we thought of converting them ahead and writing the byteArray.
we use some thing like this
public byte[] convertInt(int value) {
return new byte[]{
(byte) (value >>> 24), (byte) (value >>> 16), (byte) (value >>> 8), (byte) (value >>> 0),
(byte) 0, (byte) 0, (byte) 0, (byte) 0};
}
and this byte[] we write into the stream in writeExternal() method.
public void writeExternal(final ObjectOutput out) throws IOException {
out.writeInt(this.aData.length);
out.write(this.aData);
}
This Externalizable object is a subclass of another parent object and we serialize that parent object like this.
PartenObject po = new ParentObject();
....setters
...
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(byteArrayOutputStream);
objectOutpuStream.writeObject(po);
But we see much overhead when we call this writeObject() method.
So are there any optimizations in Jboss Serialization in this redard..
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017188#4017188
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017188
19 years, 1 month
[Design of JBoss jBPM] - Re: various questions
by david.lloyd@jboss.com
"brittm" wrote : Of course, if jBPM implemented a general business key, it would also need to support configuration in the process def or what it should be called. Otherwise, different kinds of keys (order/trouble ticket) could duplicate values, and a generic UI wouldn't know what to call the key.
I think that naming the field anything other than "key" would be a question of user code policy.
After all, users might think of a process instance as a "ticket" or a "request" or an "order", rather than as a process instance. Apart from possibly providing customizable resource bundles in the web console, I don't think this is something that should be dealt with by the jBPM core.
Also, uniqueness is something that should be decided by the application developer. The developer may decide that every process definition gets a unique key, or they may decide that key is unique by process name. Or they may develop rules that we can't anticipate.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017168#4017168
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017168
19 years, 1 month
[Design of JBoss jBPM] - Re: various questions
by brittm
In general, I support what David and Ronald are saying. In order to get a clean, performant association between our processes and business objects (ie, orders) we're storing process instance ids in a dedicated table that maps to the business keys of our business objects. Our process variable table is huge and we need something much smaller that is properly indexed for speed.
Of course, if jBPM implemented a general business key, it would also need to support configuration in the process def or what it should be called. Otherwise, different kinds of keys (order/trouble ticket) could duplicate values, and a generic UI wouldn't know what to call the key. (can't rely on process definition id or name to distinguish your business key types, because a single business concept, like order, may be represented by more than one process def depending on the kind of order). For performance, the business key type should be stored directly against the key's value and procInstId, whether it be a reference to the type string or the string itself.
-Britt
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017157#4017157
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017157
19 years, 1 month
[Design of EJB 3.0] - Re: [long read] Info/help needed on extending EJB3 container
by bill.burke@jboss.com
EJB3 is built on JBoss AOP framework. ALl the facilities you would need to do this are built in already.
You need:
1. A service that holds your routing information and matches it up to an EJBContainer. EJB3 containers are all registered in org.jboss.ejb3.Ejb3Registry
2. a Server-side aspect that intercepts the invocation and reroutes the invocation. You can add this aspect to all EJB containers by adding your aspect to the ejb3-interceptors-aop.xml file. Server side AOP bindings are defined in various aspect domains in this file.
3. Use org.jboss.aop.metadata.ThreadMetaData class to associate contextual data with with the calling Thread.
4. Add the MergeMetaDataInterceptor to the client interceptor chains defined in ejb3-interceptors-aop.xml. This interceptor must be defined before InvokeRemoteInterceptor in the interceptor stack definition. What this interceptor will allow you to do is to pass contextual data you assigned with the ThreadMetaData class over the wire to the server.
5. The Server-side aspect would do Invocation.getMetaData(key, value) to obtain any contextual metadata you assigned through ThreadMetaData.
Hope this gives you some hints.
Bill
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017099#4017099
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017099
19 years, 1 month