[IronJacamar Development] - Re: Parsing and validation
by Jesper Pedersen
Jesper Pedersen [http://community.jboss.org/people/jesper.pedersen] created the discussion
"Re: Parsing and validation"
To view the discussion, visit: http://community.jboss.org/message/574130#574130
--------------------------------------------------------------
> Validation has been implemented as method validate AND it's fired for every metadata creation (aka as part of the constructor). I think it's better to have valid metadata since we are working with immutable object at metadata level (at least in 99% of cases). Of course the method validate is public and can be fired by metadata's client too in case of metadata forced modification (forceXXX methods). Opinions?
The validator is also available as a standalone tool, and have Ant and Maven integration. Having the validator as part of our deployment chain is to ensure that people are actually using it before deploying to our container.
So all the triggered rules should be collected and summaried in the generated report.
> Of course make this fine grained check would need some extra analysis and some extra documentation, but I think we would get great benefits.
Yes, it would be nice to have a very fine gained analysis of the deployments. However, I think it is of lower priority than some of our other tasks atm. If we have some sort of framework for these validation rules it would be a good task for a new contributor.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/574130#574130]
Start a new discussion in IronJacamar Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 1 month
[JBoss ESB Development] - List of ESB Categories, Services and OneWay/TwoWay
by Anders Sejersbol
Anders Sejersbol [http://community.jboss.org/people/sejersbol] created the discussion
"List of ESB Categories, Services and OneWay/TwoWay"
To view the discussion, visit: http://community.jboss.org/message/574226#574226
--------------------------------------------------------------
Hi,
Simple question, is it possible (programmatically and on runtime) to retrieve a list of all deployed Categories and Services, and whether they are OneWay or TwoWay?
I have been trying to do this via the jUDDI, but I'm only about 1/2 way there... Here is what I got:
{code}
...
import org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl;
import org.jboss.soa.esb.services.registry.Registry;
...
System.setProperty("org.jboss.soa.esb.registry.queryManagerURI",
" http://lv-t-phxesb01:8080/juddi/inquiry http://lv-t-phxesb01:8080/juddi/inquiry");
System.setProperty(
"org.jboss.soa.esb.registry.lifeCycleManagerURI",
" http://lv-t-phxesb01:8080/juddi/publish http://lv-t-phxesb01:8080/juddi/publish");
System.setProperty("org.jboss.soa.esb.registry.factoryClass",
"org.apache.ws.scout.registry.ConnectionFactoryImpl");
System.setProperty("org.jboss.soa.esb.registry.user", "admin");
System.setProperty("org.jboss.soa.esb.registry.password", "admin");
System.setProperty("javax.xml.registry.ConnectionFactoryClass",
"org.apache.ws.scout.registry.ConnectionFactoryImpl");
Registry registry = new JAXRRegistryImpl();
// Registry registry = RegistryFactory.getRegistry();
List<String> services = registry.findAllServices();
System.out.println(services);
System.setProperty("org.jboss.soa.esb.registry.queryManagerURI", " http://my-esb-server:8080/juddi/inquiry http://my-esb-server:8080/juddi/inquiry");
System.setProperty("org.jboss.soa.esb.registry.lifeCycleManagerURI", " http://my-esb-server:8080/juddi/publish http://my-esb-server:8080/juddi/publish");
System.setProperty("org.jboss.soa.esb.registry.factoryClass", "org.apache.ws.scout.registry.ConnectionFactoryImpl");
System.setProperty("org.jboss.soa.esb.registry.user", "myuser");
System.setProperty("org.jboss.soa.esb.registry.password", "mypass");
System.setProperty("javax.xml.registry.ConnectionFactoryClass", "org.apache.ws.scout.registry.ConnectionFactoryImpl");
Registry registry = new JAXRRegistryImpl();
List<String> services = registry.findAllServices();
System.out.println(services);
...
{code}
This works (if you include a bunch of JARs), but I'm not sure this is the right way to do it, and I'm also still missing the Categories and whether they are OneWay or TwoWay.
Can someone guide me in a direction of a proper solution - any information is appriciated!
Thanks in advance!
Kind regards
Anders Sejersbol
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/574226#574226]
Start a new discussion in JBoss ESB Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 1 month
[IronJacamar Development] - Parsing and validation
by Stefano Maestri
Stefano Maestri [http://community.jboss.org/people/maeste] created the discussion
"Parsing and validation"
To view the discussion, visit: http://community.jboss.org/message/573836#573836
--------------------------------------------------------------
Writing negative unit test cases for Metadata Parsers I realized we are not Throwing exception in case of mandatory element missing.
We are not validating xml file too, so even if these elements are defined as mandatory from xsd parser just try to parse them and in a lot of cases it got success. The result is (for example) a DataSource without driver class defined that is totally bad.
We should of course avoid these situations, and xsd validation is not a solution IMHO since our metadata could be build not only from xml but also from annotation and maybe in future updated from a management console.
It's not a little (even if it's not very big) work since all metadata have to be revisited and updated to verify and validate input data in constructor throw exception and so on. Maybe it would better to switch from current constructors strategy to a builder pattern for metadata providing validation of inputs, but I have to think about that.
IMHO it's a top priority task.
Opinions?
S.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/573836#573836]
Start a new discussion in IronJacamar Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 1 month