[Design of POJO Server] - Where are metadata classes for JavaEE/EJB?
by bill.burke@jboss.com
Are these metadata classes for ejb-jar.xml and javaee5.xsd in SVN yet? Where?
Augmenting the metamodel with annotation information is something that the EJB team can definately do. As well as getting the metamodel to work with the current deployers.
The way I envision it is:
1) A parsing deployer for ejb-jar.xml and one for jboss.xml (I guess so we can deploy wls descriptors and such?)
2) A javax annotation processor for ENC/injection annotations that augment any metadata created by ejb deployer or web deployer
3) org.jboss annotation processor for same thing
4) An EJB deployer that takes metamodel, creates EJB Containers, and deploys based on that metamodel.
I or EJB team can take on any one of the tasks as long as the metamodel classes/API are complete. That way you can focus on things closer to the kernel rather than any EJB specific things and we can add in our help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978903#3978903
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978903
19 years, 5 months
[Design the new POJO MicroContainer] - Re: JBMICROCONT-105, structural deployer, vfs refactoring
by scott.stark@jboss.org
A refactoring I have working with the DeclaredStructure deployer is the following:
| public interface StructureDeployer
| {
| /**
| * Determine the structure of a deployment
| *
| * @param file - the candidate root file of the deployment
| * @param metaData - the structure metadata to build
| * @param deployers - the available structure deployers
| * @return true when it is recongnised
| */
| boolean determineStructure(VirtualFile file, StructureMetaData metaData, StructuredDeployers deployers);
|
| int getRelativeOrder();
|
| /** The comparator for relative ordering of deployers */
| Comparator<StructureDeployer> COMPARATOR = new StructureComparator();
| ...
| }
|
where the externalized view of the structure deployers is:
| public interface StructuredDeployers
| {
| /**
| *
| * @param file - root of the deployment in the VFS
| * @param metaData - the existing metadata to use/populate with structure metadata
| * @return
| * @throws DeploymentException
| */
| public boolean determineStructure(VirtualFile file, StructureMetaData metaData) throws DeploymentException;
|
| /**
| * Get the ordered set of deployers.
| * @return the ordered set of deployers.
| */
| public SortedSet<StructureDeployer> getDeployers();
| /**
| * Are there any deployers
| * @return
| */
| public boolean isEmpty();
| }
|
to transform the StructureMetaData resulting from the structural parse into a DeploymentContext, there is a StructureVisitorFactory notion that is external to the structure parse. This replaces the CandidateStructureVisitorFactory notion that was incorporated into the abstract structural deployer classes, and is another aspect of the MainDeployer.
| public interface StructureVisitorFactory
| {
| /**
| * Create the visitor
| *
| * @param context the deployment context
| * @param attributes the visitor attributes uses {@link VisitorAttributes#DEFAULT} when null
| * @return the visitor
| * @throws Exception for any error
| */
| VirtualFileVisitor createVisitor(DeploymentContext context, StructureMetaData metaData,
| VisitorAttributes attributes) throws Exception;
| }
|
The StructureMetaData abstraction is:
| /**
| * A map of vfs paths to deployment context information.
| */
| public interface StructureMetaData
| {
| public void addContext(ContextInfo context);
| public ContextInfo getContext(String vfsPath);
| public ContextInfo removeContext(String vfsPath);
| }
| public interface ContextInfo
| {
| public String getVfsPath();
| public void setVfsPath(String path);
|
| public String getMetaDataPath();
| public void setMetaDataPath(String metaDataPath);
|
| public List<ClassPathInfo> getClassPath();
| public void setClassPath(List<ClassPathInfo> classPath);
| }
| public interface ClassPathInfo
| {
| /**
| * path relative to the context virtual file.
| */
| public String getPath();
| public void setPath(String path);
|
| /**
| * Classpath options
| */
| public Map getOptions();
| public void setOptions(Map options);
|
| public Object getOption(Object key);
| public void setOption(Object key, Object value);
| }
|
How does this look?
I'm creating some tests that replace the usage of the common ArchiveBrowser to validate that this can be replaced with the vfs/StructuredDeployers abstractions.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978901#3978901
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978901
19 years, 5 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Client failover redeliveries discussion
by timfox
So to summarise:
1) Detect failover
2) Find the "correct" failover server. (This may take several stops)
3) Let the server "stall" you until server failover has completed
4) Recreate the conections, sessions, consumers, producers and browsers. (Swapping ids here sounds fine)
5) Delete any non persistent messages from the client list of unacked messages in any sessions in the failed connection.
6) Send a list of the ids of the peristent messages for each consumer that failed to the server. For each list recreate the ServerConsumerEndpoint delivery list by removing the refs from the channel and creating deliveries and putting in the list.
7) The connection is now ready to be used
Note: We must also ensure that no new connections are created on the failover node while old connections are being recreated, otherwise we can have a situation where the new connections grab the messages which have already been delivered to consumers in the failed connecton!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978893#3978893
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978893
19 years, 5 months