-
15. Re: Resource Adapter integration on AS7
maeste Apr 27, 2011 5:29 AM (in response to clebert.suconic)Well you can create our pojo both using our parser on an xml portion valid against our xsd or building it in the code using pojo constructors. Our Pojo are basically immutablem but we are providing also a Merger utility class to merge 2 different Metadata (i.e. built from different xml or even one from xml and one from code).
Let me point you to some code, that maybe could be more clear.
a) Build a ResourceAdapters object from the code https://github.com/maeste/jboss-as/blob/IJ-beta6/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/AbstractRaOperation.java#L92
b) Merging this metadata to ra.xml ones (i.e. connector stndard definition) https://github.com/maeste/jboss-as/blob/IJ-beta6/connector/src/main/java/org/jboss/as/connector/deployers/processors/RaXmlDeploymentProcessor.java#L123
c) you can also extend AbstractResourceAdapterDeployer as done here https://github.com/maeste/jboss-as/blob/IJ-beta6/connector/src/main/java/org/jboss/as/connector/metadata/deployment/ResourceAdapterDeploymentService.java#L175.
Note that "URL url" and "File root" is used just to generate uniqueId and register on our internal metadata repository and for management. If you are going to implement a "static" deployed ra you can safely do something like I've done for dataSources deployment here:
anyway let's talk later, I've pointed you to some code just hoping to help the discussion
best regards
S.
-
16. Re: Resource Adapter integration on AS7
ataylor Apr 27, 2011 6:36 AM (in response to maeste)maybe i am mis understanding this whole conversation but why do we need to write any integration code for a resource adaptor, i would expect to be able to plug in any RA by just using configuration?
-
17. Resource Adapter integration on AS7
jesper.pedersen Apr 27, 2011 9:59 AM (in response to ataylor)The IronJacamar XSD, which is used for configuring all outbound connection factories: http://docs.jboss.org/ironjacamar/schema/ironjacamar_1_0.xsd
-
18. Resource Adapter integration on AS7
maeste Apr 27, 2011 10:04 AM (in response to clebert.suconic)As discussed on the call here you have the links to parsers and actual Objects:
Feel free to ping me if you need any further informations.
S.
-
19. Resource Adapter integration on AS7
maeste Apr 27, 2011 10:13 AM (in response to maeste)And here you have the implementation of metadatas
regards
S.
-
20. Re: Resource Adapter integration on AS7
maeste Apr 29, 2011 2:52 AM (in response to clebert.suconic) -
21. Re: Resource Adapter integration on AS7
maeste Apr 29, 2011 8:56 AM (in response to clebert.suconic)Oki, I've done with this service.
You can find it in this branch on git (pull request already sent):
https://github.com/maeste/jboss-as/tree/AS7-699
I'm going to write a test case to help you integrate it. Anyway if you have any question or want any help just ping me on IRC (maeste nickname)
bye
S.
-
22. Resource Adapter integration on AS7
maeste May 2, 2011 10:26 AM (in response to maeste)Hi All,
In this branch
https://github.com/maeste/jboss-as/tree/HornetQPrototype
You have a prototype service (called HornetqProtorypeService) using the ResourceAdapterActivatorService to deploy the ra and get the CFs.
Note that here you have also an example on how to use our own parser (passing a String) to generate metadatas.
If you prefer to look only to chanhed code to add this service and its dependency, everything is in this commit
https://github.com/maeste/jboss-as/commit/787ae82770531c01b8277519ffe8354089e2935d#diff-9
Feel free to ping me on IRC if you need me.
Note that this branch is just an example for you and it will NEVER be pulled in the master.
regards
S.
-
23. Re: Resource Adapter integration on AS7
ataylor May 3, 2011 12:29 PM (in response to maeste)Jesper,
In the meeting you posted a snippet on irc as to what the config may look like, could you post that on here please. I'm trying to understand the link between this piece of config and how i get my ModelAddOperationHandler to get invoked with the config.
cheers
A
-
24. Re: Resource Adapter integration on AS7
jesper.pedersen May 3, 2011 2:13 PM (in response to ataylor)Well, it is a question of "transforming" the config-property's of the resource adapter into an element structure inside the HornetQ subsystem, f.ex. making "ConnectorClassName" with a value of "org.hornetq.core.remoting.impl.invm.InVMConnectorFactory" into a snippet like
<hornetq> <resource-adapter> <in-vm> ... </in-vm> </resource-adapter> </hornetq>
The key is to only expose the concepts that should be supported, and keep implementation details like f.ex. class names internal.
Then you can document the features in the XSD, and implement the necessary handlers to allow changes at run-time.
-
25. Re: Resource Adapter integration on AS7
ataylor May 3, 2011 2:19 PM (in response to jesper.pedersen)cheers Jesper i get that bit, i was just wondering whether in the config file (sat standalone.xml) this should be declared as its own subsystem or just as part of the messaging subsystem config?
-
26. Re: Resource Adapter integration on AS7
jesper.pedersen May 4, 2011 1:35 PM (in response to ataylor)That is basically up to you to decide.
The JCA team did a split into three subsystem
- connector -- The general JCA container configuration
- resource-adapters -- Configuration of resource adaper deployments
- datasources -- Configuration of datasources
Maybe you want one or more for configuration and one for deployments of queues and topics.
-
27. Re: Resource Adapter integration on AS7
ataylor May 4, 2011 2:44 PM (in response to jesper.pedersen)well currently im puting it as part of the messaging sub system, let me get this working, to some degree, then it should be easy to move depending on what people think.
-
28. Re: Resource Adapter integration on AS7
ataylor May 9, 2011 8:09 AM (in response to ataylor)Guys,
Ive been messing around with this for a couple of days now but struggling to get anything to work, Ivebasically added a sub model of the messaging subsytem. I did this based on a subsystem that was already there for queues, i.e. 'QueueAdd'. Fort now i just have the xml looking something like this:
<resource-adaptor>
<in-vm>
<jndi-name>java:/JmsXA</jndi-name>
<server-id>0</server-id>
</in-vm>
</resource-adaptor>
However even tho when i debug i see that this is parsed correctly my 'HornetQConnectionSubsystemAdd' never gets called. Just to make sure that the 'QueueAdd' that is already there works i added this configuration i added this so i could debug it to see if i could see anything that i have missed and it turns out this doesnt work either, altho in this instance there is a warning:
New missing/unsatisfied dependencies:
service jboss.messaging.jms.manager (missing)
I'm struggling a bit now to understand what i have missed so some help would be most welcome, fyi i have a branch at https://github.com/andytaylor/jboss-as/tree/ResourceAdaptorIntegration
-
29. Re: Resource Adapter integration on AS7
jesper.pedersen May 9, 2011 8:34 AM (in response to ataylor)Those types of questions are better discussed in the AS 7 forum (http://community.jboss.org/en/jbossas/dev/jboss_as7_development) or on #jboss-as7 on FreeNode.