jca

How to marry NioServerSocketChannelFactory and WorkManager

元气小坏坏 提交于 2019-12-08 10:48:55
问题 I am looking to implement a JCA Resource adapter to accept socket connections from within J2EE container. I need to somehow be able to use WorkManager to manage threads in netty's NioServerSocketChannelFactory Any Help is greatly appreciated. 回答1: Got it! NioServerSocketChannelFactory takes two Executor(s), boss and worker, as parameters to the constructor. so all I need to do is develop a facade to WorkManager to implement execute(Runnable) method that will use workManager.schedule(...) call

Weblogic could not find resource adapter with “correct” JNDI name for binding

十年热恋 提交于 2019-12-06 03:11:08
问题 I am trying to bind my message driven bean with Oracle JCA file adapter (which is included in the SOA suite) on Weblogic 10.3.5. So that my MDB can get notified when there is any .txt file is moved to specific directory. After launching a Weblogic domain with SOA features supported, the file adapter is automatically deployed. On Weblogic console I can see the file adapter is deployed as a "Resource Adapter", health is "OK", state is "Active", as shown below: Also I run the tests of the file

ObjectInputStream with CipherInputStream freezing, hanging

廉价感情. 提交于 2019-12-04 20:01:46
I'm programming client-server based Java application and I've got a problem, because it hangs when constructing ObjectInputStream both in client and server. Client: Socket socket = new Socket("localhost", 9999); outCiph = new CipherOutputStream(socket.getOutputStream(), AES.getEncryptCipher("key")); out = new ObjectOutputStream(outCiph); inCiph = new CipherInputStream(socket.getInputStream(), AES.getDecryptCipher("key")); in = new ObjectInputStream(inCiph); try { String text = "test!"; out.writeObject(text); out.flush(); if (out != null) out.close(); if (in != null) in.close(); } catch

Create DES key from 56 bit binary string

℡╲_俬逩灬. 提交于 2019-12-04 09:29:52
问题 I have a 56 bit binary string that i want to use as the secret key for DES encryption. I found the following code at the JCA docs website byte[] desKeyData = { (byte)0x01, (byte)0x02, (byte)0x03, (byte)0x04, (byte)0x05, (byte)0x06, (byte)0x07, (byte)0x08 }; DESKeySpec desKeySpec = new DESKeySpec(desKeyData); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES"); SecretKey secretKey = keyFactory.generateSecret(desKeySpec); However this uses 8 bytes for the key (instead of 7). It is

Define cipher suite for TLS in JCA

梦想的初衷 提交于 2019-12-03 12:02:31
I want the support of the following cipher suites in TLS using JCA: TLS_PSK_WITH_3DES_EDE_CBC_SHA TLS_PSK_WITH_AES_128_CBC_SHA TLS_PSK_WITH_NULL_SHA TLS_PSK_WITH_AES_128_CBC_SHA256 TLS_PSK_WITH_NULL_SHA256 They are available in JDK7 but not JDK6 , neither BouncyCastle. If I want the support in JDK6, could I extends JCA to implement the support of these PSK extensions, using SPI, providers and callback methods of JSSE. I can already redefine or add new cipher implementations on runtime, but I'm not sure JCA offers enough granularity to add new cipher suites in TLS. The clean way would be to

Create DES key from 56 bit binary string

北战南征 提交于 2019-12-03 03:13:40
I have a 56 bit binary string that i want to use as the secret key for DES encryption. I found the following code at the JCA docs website byte[] desKeyData = { (byte)0x01, (byte)0x02, (byte)0x03, (byte)0x04, (byte)0x05, (byte)0x06, (byte)0x07, (byte)0x08 }; DESKeySpec desKeySpec = new DESKeySpec(desKeyData); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES"); SecretKey secretKey = keyFactory.generateSecret(desKeySpec); However this uses 8 bytes for the key (instead of 7). It is not clear if the desKeyData[0] corresponds to the least significant byte or the most significant one.

Which is the best approach to connect IBM Mainframe application using Java Connector Architecture (JCA)?

让人想犯罪 __ 提交于 2019-12-02 05:24:28
Which is the best approach to connect IBM Mainframe application using Java Connector Architecture (JCA)? You have many options... I've tried them all. Their CTG product can be a bottleneck and the licensing is ridiculously expensive. I recommend staying away from the Cics Transaction gateway. You can homebrew a solution using just plain data sockets. We're currently doing this. We developed a standard Java annotation library and a standard COBOL copybook. Consider mainframe webservices. The XML parsing/marshaling can be ZIIP/ZAAP eligible, so you don't incur those MIPS charges. You may also

How can I read a BouncyCastle private key PEM file using JCA? [duplicate]

倖福魔咒の 提交于 2019-12-02 03:21:03
问题 This question already has an answer here : convert openSSH rsa key to javax.crypto.Cipher compatible format (1 answer) Closed 3 years ago . In one of our applications private keys are stored using BouncyCastle's PEMWriter. At the moment I am investigating if we can get rid of the BouncyCastle dependency since Java 7 seems to have everything we need. The only issue is that I can not read the private keys stored in the database as PEM-encoded strings (the certificates/public keys are fine). If

JCA sample implementations

守給你的承諾、 提交于 2019-11-30 11:09:53
问题 I need to develop a JCA adapter and am looking for some references. I searched on Amazon, and found only 2 JCA books and one of them has pretty bad comments. So I guess that left me with only one book to refer to. So I would like to know if there is any sample implementation of JCA adapter that will help my development. I searched on Google but managed to find some very simple examples only. Thanks in advance. 回答1: When I developed adapter I used example from JBoss. I believe this is the link

JBoss 系列五:JBoss 7/WildFly中配置使用Oracle数据库

六月ゝ 毕业季﹏ 提交于 2019-11-30 01:34:16
内容概要 JBoss 系列五主要目的是演示如何在JBoss 7/WildFly中配置使用Oracle数据库,主要分两大部分Oracle数据库相关的配置,一个使用Oracle数据库的HelloWorld小程序。如下为一简单示意图: Hello World App部署于JBoss上,Hello World App通过JPA/Hibernate操作数据库,数据库连接是通过JCA/Datasource维护。 我们需要下载,编译生成Hello World App,具体根据 系列一 中相关步骤,下载,编译: git clone git@github.com:kylinsoong/csdn.git cd csdn/5 mvn clean install 如上执行完成会生成jpa-helloworld.war,位于target目录下,我们需要将它部署到JBoss。 Oracle数据库相关的配置 本部分我们分三块:JBoss 端配置,Oracle数据库端的配置,应用端配置 JBoss 端配置 1. 添加Oracle数据库驱动模块到JBoss 在JBOSS_HOME/modules/目录下创建com/oracle/main目录,将Oracle驱动jari(ojdbc6.jar)拷贝到此目录下,并同在此目录下创建module.xml文件,添加内容如下: <?xml version="1.0"