How to deploy a -ds.xml to ironjacamar embedded

瀏覽次數:69 次
跳到第一則未讀訊息

Kylin Soong

未讀,
2015年4月16日 晚上10:53:512015/4/16
收件者:ironjaca...@googlegroups.com
Current teiid embedded use bitronix to set up a datasource as [1] code snippets. it has 2 drawbacks
  • lack of deploy standard .rar
  • lack of  transactionmanager functionality
So we consider use ironjacamar replace bitronix. My question is can we deploy a datasource -ds-xml file to ironjacamar embedded, or is there a similiar API like [1].

Thanks
Kylin

[1] bitronix set up datasource
PoolingDataSource pds = new PoolingDataSource();
pds
.setUniqueName("java:/accounts-ds"); pds.setClassName("bitronix.tm.resource.jdbc.lrc.LrcXADataSource");
pds
.setMaxPoolSize(5);
pds
.setAllowLocalTransactions(true);
pds.getDriverProperties().put("user", "sa");
pds.getDriverProperties().put("password", "sa");
pds.getDriverProperties().put("url", "jdbc:h2:mem://localhost/~/account")
pds.getDriverProperties().put("driverClassName", "org.h2.Driver");








Jesper Pedersen

未讀,
2015年4月17日 下午3:06:322015/4/17
收件者:ironjaca...@googlegroups.com
You can use IronJacamar/Embedded for your use-case that will give you access to IronJacamar, and the functionality of its dependencies.

Embedded: http://www.ironjacamar.org/doc/userguide/1.2/en-US/html/ch11.html

Then you can deploy the jdbc-local.rar and jdbc-xa.rar archives to activate data source functionality. The data source definitions can be done either through -ds.xml files, or using the embedded API: http://www.ironjacamar.org/doc/api/embedded/1.2/index.html

You can bootstrap an embedded environment by using the code generator - http://www.ironjacamar.org/doc/userguide/1.2/en-US/html/ch08.html - and steal the setup from the resulting build environment.

Our test suite has examples of using IronJacamar/Embedded through Arquillian or in its raw form - you will want to check the adapters/, arquillian/ and embedded/ directories @ https://github.com/ironjacamar/ironjacamar/tree/1.2

HTH

Kylin Soong

未讀,
2015年4月20日 凌晨4:32:442015/4/20
收件者:ironjaca...@googlegroups.com
Thanks, It works fine.

Kylin Soong

未讀,
2015年6月8日 清晨7:09:262015/6/8
收件者:ironjaca...@googlegroups.com
Can we let IronJacamar Embedded more lightweight?

Current IronJacamar Embedded  almost same as IronJacamar Standalone, which use a IOC container load all service and bind it to a JNDI server, it's a Container based design, usually Embedded means that supply almost of functions with simple API, it should be no-container involved. So can we change IronJacamar Embedded in future let it more lightweight and API directly:
  • remove IOC container
  • remove container related Arquillian test logic
  • make sure dependency is simple(probably only one dependency) 
  • make sure a simple entry point(probably a factory class can get data source and XA datasource)
Except the Teiid project, there are some other JBoss project/OpenSource need built-in pooling logic, can you consider add this change in future?


On Saturday, April 18, 2015 at 3:06:32 AM UTC+8, Jesper Pedersen wrote:

Jesper Pedersen

未讀,
2015年6月8日 下午1:58:482015/6/8
收件者:ironjaca...@googlegroups.com、kylinso...@gmail.com
IronJacamar Embedded is light weight in its current form. You need an environment where the required dependencies are provided, and integrated into the IronJacamar implementation using its SPI contracts.

IronJacamar Embedded is implemented using the same technologies as IronJacamar Standalone, as it is the simplest setup for us. Other environments (like the WildFly project) uses other mechanisms in order to do the required integration, so that may serve as another starting point as to what is required to setup a new environment.

IronJacamar doesn't require Arquillian, so you can remove that dependency if you don't need it either. By removing other SPI contracts you can remove additional dependencies, but it won't be a certified implementation of the JCA specification then. As to the datasource case, it is separate from the core implementation with a dedicated deployment chain and necessary resource adapters, so there won't be a "simple entry point" - dedicated tooling on top of the existing functionality can be made, but since datasource support isn't a requirement of the JCA specification, just an example of JCA usage, this tooling won't be supplied as part of the project. Apart from what already exists.

So, yes, IronJacamar is a library that can be used in whatever context you have. But it has SPI contracts that must be implemented somehow - IronJacamar Embedded and IronJacamar Standalone are examples of that.

Kylin Soong

未讀,
2015年6月8日 晚上10:26:442015/6/8
收件者:ironjaca...@googlegroups.com、kylinso...@gmail.com
Thanks for your description.
回覆所有人
回覆作者
轉寄
0 則新訊息