{"id":252108,"date":"2015-02-28T21:29:09","date_gmt":"2015-02-28T17:29:09","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=252108"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=252108","title":{"rendered":"Java EE, JCA \u0438 jNode 2.X announce"},"content":{"rendered":"<p>\n  \u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a, %username%.<br \/>\n  \u0421\u043a\u0430\u0436\u0443 \u0441\u0440\u0430\u0437\u0443, \u043d\u0430 99% \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0441\u0442 \u043f\u0440\u043e Java EE Connector Architecture, \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043a\u043e\u0434\u0430. \u041e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u043b\u0441\u044f 1% \u043f\u0440\u043e Fidonet \u0432\u044b \u043f\u043e\u0439\u043c\u0435\u0442\u0435 \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435.<\/p>\n<p>  \u0420\u0435\u0437\u044e\u043c\u0435 \u0434\u043b\u044f \u043b\u0435\u043d\u0438\u0432\u044b\u0445JMS \u0438 JCA \u2014 \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u0438, \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 MessageDrivenBean, \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 ConnectionFactory.<br \/>\n  \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u2014 4 \u043a\u043b\u0430\u0441\u0441\u0430, \u0434\u043b\u044f \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u2014 8 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<br \/>\n  \u0414\u0430\u043b\u044c\u0448\u0435 \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0438 \u0431\u043e\u043b\u044c<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u2014 \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>  \u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<br \/>\n  \u041c\u043d\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u043e\u0431 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0441\u0438\u0441\u0442\u0435\u043c\u044b (\u00ab\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0410\u00bb ) \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u043c\u043d\u043e\u0433\u043e \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u00ab\u0441\u0438\u0441\u0442\u0435\u043c\u0430 B\u00bb). \u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0443\u0436\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0435\u043b\u044c\u0437\u044f, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0432\u0435\u043b\u0430\u0441\u044c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043d\u0435\u043a\u043e\u0439 \u0448\u0438\u043d\u044b\/\u043f\u0440\u043e\u043a\u0441\u0438. \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u0442\u0443\u0434\u0430-\u0441\u044e\u0434\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0441 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0435\u0439 \u0438\u0445 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439. <\/p>\n<p>  \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u00ab\u0410\u00bb \u0438\u043c\u0435\u043b\u0430 \u043c\u043d\u043e\u0433\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438, \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043d\u044b \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u044b. \u041f\u043e\u0434 \u044d\u0442\u043e \u0434\u0435\u043b\u043e \u0431\u044b\u043b \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0437\u0430\u043f\u0438\u043b\u0435\u043d \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u043a\u0435\u043b\u0435\u0442 \u0434\u043b\u044f JEE \u2014 JAX-WS+EJB+JMS \u0434\u043b\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<br \/>\n  \u0410 \u0432\u043e\u0442 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u00abB\u00bb \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043d\u0435 \u0431\u044b\u043b\u043e. \u0420\u043e\u0431\u043a\u0438\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0441\u0435\u0442\u044c\u044e \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 EJB \u0443\u0441\u043f\u0435\u0445\u043e\u043c \u043d\u0435 \u0443\u0432\u0435\u043d\u0447\u0430\u043b\u0438\u0441\u044c, \u0433\u0443\u0433\u043b \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u0430\u043b \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b: \u043a\u043e\u0441\u0442\u044b\u043b\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u043b\u0435\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 non-http \u0438\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c JCA-\u0430\u0434\u0430\u043f\u0442\u0435\u0440. \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0443\u0442\u044c \u2014 \u0441 JCA \u044f \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u0430 \u0443\u0437\u043d\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e.<\/p>\n<p>  \u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435<br \/>\n  \u041d\u0430\u0447\u0430\u0432 \u043a\u043e\u043f\u0430\u0442\u044c \u0433\u0443\u0433\u043b, \u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0431\u043b\u043e\u043c\u0430\u043b\u0441\u044f. \u0412\u0435\u0437\u0434\u0435 \u043f\u0438\u0441\u0430\u043b\u0438, \u0427\u0422\u041e \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c ( \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440, \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440, \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u0438\u0442\u0434 ), \u043d\u043e \u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u043f\u0438\u0441\u0430\u043b\u0438, \u041a\u0410\u041a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u00ab\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0447\u0443\u0436\u043e\u0439 \u043a\u043e\u0434 \u0438 \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u00bb \u0434\u0430\u043b \u0441\u0431\u043e\u0439 \u2014 \u0447\u0443\u0436\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0431\u044b\u043b \u0442\u0430\u043a\u043e\u0439 \u043c\u0438\u0437\u0435\u0440, \u0447\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043c\u043d\u0435 \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c.<\/p>\n<p>  \u0421\u043f\u0430\u0441\u043b\u0438 \u043c\u0435\u043d\u044f \u0434\u0432\u0435 \u0432\u0435\u0449\u0438: JSR 322 \u0438 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0433\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u043d\u0430 google code. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044d\u0442\u043e \u0438 \u0441\u0442\u0430\u043b\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u2014 \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0437 jca-sockets \u0438 \u043e\u0442\u043a\u0440\u044b\u0432 pdf, \u044f \u043d\u0430\u0447\u0430\u043b \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0438 \u043f\u0443\u0442\u0435\u043c \u043d\u0430\u0443\u0447\u043d\u043e\u0433\u043e \u0442\u044b\u043a\u0430 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u043e\u043d\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>  \u041f\u043e\u0442\u0440\u0430\u0442\u0438\u0432 \u043e\u043a\u043e\u043b\u043e 16 \u0447\u0430\u0441\u043e\u0432 \u043d\u0430 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b, \u044f \u0432\u044b\u044f\u0441\u043d\u0438\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p>  JCA-\u043c\u043e\u0434\u0443\u043b\u044c \u0438\u043c\u0435\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0431\u044f \u0434\u0432\u0435 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0447\u0430\u0441\u0442\u0438: \u00ab\u0412\u0445\u043e\u0434\u044f\u0449\u0438\u0435\u00bb \u0438 \u00ab\u0418\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435\u00bb. \u042d\u0442\u0438 \u0447\u0430\u0441\u0442\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u0432\u043c\u0435\u0441\u0442\u0435, \u0442\u0430\u043a \u0438 \u043f\u043e-\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0438\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e. \u0421\u0430\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0442\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u043c, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u043c javax.resource.spi.ResourceAdapter \u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0432 META-INF\/ra.xml, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c ResourceAdapter \u043d\u0443\u0436\u0435\u043d \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0412\u0445\u043e\u0434\u044f\u0449\u0438\u043c\u0438; \u0414\u043b\u044f \u0418\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0438 \u0435\u0433\u043e \u0441\u043a\u0435\u043b\u0435\u0442 \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c.<\/p>\n<p>  \u0412\u0445\u043e\u0434\u044f\u0449\u0438\u0435<br \/>\n  \u0412\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043a\u0430\u043d\u0430\u043b \u0431\u0438\u043d\u0434\u0438\u0442\u0441\u044f \u043a MessageEndpoint&#8217;\u0443 ( \u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e @MessageDrivenBean; \u0434\u0430-\u0434\u0430, JCA \u044d\u0442\u043e \u043a\u0438\u0448\u043a\u0438 JMS ) \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f ActivationSpec&#8217;\u043e\u043c.<br \/>\n  META-INF\/ra.xml \u2014 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 ResourceAdapter&#8217;\u0430 \u0438 inbound \u043f\u043e\u0442\u043e\u043a\u043e\u0432<br \/>\n  ra.xml&lt;connector xmlns=&quot;http:\/\/xmlns.jcp.org\/xml\/ns\/javaee&quot;            xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot;            xsi:schemaLocation=&quot;http:\/\/xmlns.jcp.org\/xml\/ns\/javaee            http:\/\/xmlns.jcp.org\/xml\/ns\/javaee\/connector_1_7.xsd&quot;            version=&quot;1.7&quot; metadata-complete=&quot;true&quot;&gt;     &lt;vendor-name&gt;kreon-services&lt;\/vendor-name&gt;    &lt;eis-type&gt;FidoNet&lt;\/eis-type&gt;    &lt;resourceadapter-version&gt;2.5&lt;\/resourceadapter-version&gt;    &lt;resourceadapter&gt; &lt;!&#8212; \u041a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 javax.resource.spi.ResourceAdapter; config-property &#8212; \u043f\u043e\u043b\u044f, \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0447\u0435\u0440\u0435\u0437 \u0433\u0435\u0442\u0442\u0435\u0440\u044b\/\u0441\u0435\u0442\u0442\u0435\u0440\u044b &#8212;&gt;       &lt;resourceadapter-class&gt;in.fidonode.binkp.ra.BinkpServerResourceAdapter&lt;\/resourceadapter-class&gt;       &lt;config-property&gt;          &lt;config-property-name&gt;version&lt;\/config-property-name&gt;          &lt;config-property-type&gt;java.lang.String&lt;\/config-property-type&gt;          &lt;config-property-value&gt;jnode-jee 2.5 binkp\/1.1&lt;\/config-property-value&gt;       &lt;\/config-property&gt; &lt;!&#8212; \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 &#8212;&gt;       &lt;inbound-resourceadapter&gt;          &lt;messageadapter&gt;             &lt;messagelistener&gt; &lt;!&#8212; \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c @MessageDrivenBean \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u044d\u0442\u043e\u0433\u043e \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430 &#8212;&gt;                &lt;messagelistener-type&gt;in.fidonode.binkp.ra.BinkpMessageListener&lt;\/messagelistener-type&gt;                &lt;activationspec&gt; &lt;!&#8212; \u041a\u043b\u0430\u0441\u0441-\u0445\u043e\u043b\u0434\u0435\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 @ActivationConfigProperty, \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0433\u0435\u0442\u0442\u0435\u0440\u044b \u0438 \u0441\u0435\u0442\u0442\u0435\u0440\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 &#8212;&gt;                   &lt;activationspec-class&gt;in.fidonode.binkp.ra.BinkpActivationSpec&lt;\/activationspec-class&gt; &lt;!&#8212; \u0421\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 &#8212;&gt;                   &lt;required-config-property&gt;                      &lt;config-property-name&gt;listenPort&lt;\/config-property-name&gt;                   &lt;\/required-config-property&gt; &lt;!&#8212; \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 &#8212;&gt;                   &lt;config-property&gt;                      &lt;config-property-name&gt;listenPort&lt;\/config-property-name&gt;                      &lt;config-property-type&gt;java.lang.Integer&lt;\/config-property-type&gt;                      &lt;config-property-value&gt;24554&lt;\/config-property-value&gt;                   &lt;\/config-property&gt;                &lt;\/activationspec&gt;             &lt;\/messagelistener&gt;          &lt;\/messageadapter&gt;       &lt;\/inbound-resourceadapter&gt;    &lt;\/resourceadapter&gt; &lt;\/connector&gt; <\/p>\n<p>  \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 BinkpMessageListener \u2014 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432 classpath;<\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0435\u0433\u043e \u0442\u0443\u0442:<br \/>\n  public interface BinkpMessageListener { \tpublic void onMessage(FidoMessage message); } <\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e ResourceAdapter<br \/>\n  BinkpServerResourceAdapter.javapublic class BinkpServerResourceAdapter implements ResourceAdapter, Serializable {  \tprivate static final long serialVersionUID = 1L; \tprivate static Logger log = Logger.getLogger(BinkpServerResourceAdapter.class \t\t\t.getName()); \tprivate ConcurrentHashMap&lt;BinkpActivationSpec, BinkpEndpoint&gt; activationMap =  \t\t\tnew ConcurrentHashMap&lt;BinkpActivationSpec, BinkpEndpoint&gt;(); \tprivate BootstrapContext ctx; \tprivate String version;  \t@Override \tpublic void endpointActivation(MessageEndpointFactory endpointFactory, \t\t\tActivationSpec spec) throws ResourceException { \t\tBinkpEndpoint activation = new BinkpEndpoint(ctx.getWorkManager(), \t\t\t\t(BinkpActivationSpec) spec, endpointFactory); \t\tactivationMap.put((BinkpActivationSpec) spec, activation); \t\tactivation.start();  \t\tlog.info(&quot;endpointActivation(&quot; + activation + &quot;)&quot;);  \t} \t@Override \tpublic void endpointDeactivation(MessageEndpointFactory endpointFactory, \t\t\tActivationSpec spec) { \t\tBinkpEndpoint activation = activationMap.remove(spec); \t\tif (activation != null) \t\t\tactivation.stop();  \t\tlog.info(&quot;endpointDeactivation(&quot; + activation + &quot;)&quot;);  \t} \t@Override \tpublic void start(BootstrapContext ctx) \t\t\tthrows ResourceAdapterInternalException { \t\tthis.ctx = ctx; \t\tlog.info(&quot;start()&quot;);  \t} \t@Override \tpublic void stop() { \t\tfor (BinkpEndpoint act : activationMap.values()) { \t\t\tact.stop(); \t\t} \t\tactivationMap.clear(); \t\tlog.info(&quot;stop()&quot;); \t}  \t@Override \tpublic XAResource[] getXAResources(ActivationSpec[] arg0) \t\t\tthrows ResourceException { \t\treturn null; \t}  \tpublic String getVersion() { \t\treturn version; \t}  \tpublic void setVersion(String version) { \t\tthis.version = version; \t}  } <\/p>\n<p>  \u0427\u0442\u043e \u0442\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442? \u041f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 JCA-\u043c\u043e\u0434\u0443\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 BinkpServerResourceAdapter, \u0443 \u043d\u0435\u0433\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b ( \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u043f\u043e\u043b\u0435 version) \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 start().<br \/>\n  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 start() \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e, \u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u043d\u0435\u0433\u043e \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c WorkManager&#8217;\u0430.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 @MessageDrivenBean, \u043e\u043d \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u0430\u0434\u0430\u043f\u0442\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u0442\u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0431\u0438\u043d. \u0414\u043b\u044f JMS \u044d\u0442\u043e MessageListener, \u0443 \u043d\u0430\u0441 \u044d\u0442\u043e BinkpMessageListener. \u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f ActivationSpec ( \u0443 \u043d\u0430\u0441 \u044d\u0442\u043e BinkpActivationSpec, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 javax.resource.spi.ActivationSpec), \u043f\u043e\u043b\u044f \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u0432 activationConfig, \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f MessageEndpointFactory \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f ResourceAdapter.endpointActivation(). \u0412 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u043e\u0442 \u00ab\u0441\u0435\u0440\u0432\u0435\u0440\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u0431\u0443\u0434\u044c \u0442\u043e tcp\/ip \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u043b\u0438 \u043f\u043e\u0442\u043e\u043a \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 unix-socket, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0432 MDB. \u041a\u043b\u0430\u0441\u0441 BinkpEndpoint \u2014 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u00ab\u0441\u0435\u0440\u0432\u0435\u0440\u00bb.<br \/>\n  BinkpEndpoint.javapublic class BinkpEndpoint implements Work, FidoMessageListener { \tprivate static final Logger logger = Logger.getLogger(BinkpEndpoint.class \t\t\t.getName()); \tprivate BinkpServer server; \tprivate final WorkManager workManager; \tprivate final MessageEndpointFactory messageEndpointFactory;  \tpublic BinkpEndpoint(WorkManager workManager, \t\t\tBinkpActivationSpec activationSpec, \t\t\tMessageEndpointFactory messageEndpointFactory) { \t\tthis.workManager = workManager; \t\tthis.messageEndpointFactory = messageEndpointFactory; \t\tserver = new BinkpServer(activationSpec.getListenPort(), this); \t}  \tpublic void start() throws ResourceException { \t\tworkManager.scheduleWork(this); \t}   \tpublic void stop() { \t\t\tif (server != null) { \t\t\t\tserver.stop(); \t\t\t} \t} \t\/** \u0438\u0437 FidoMessageListener **\/ \t@Override \tpublic Message incomingMessage(FidoMessage message) { \t\t\tString message = msg.encode(); \t\t\tBinkpMessageListener listener = (BinkpMessageListener) messageEndpointFactory \t\t\t\t\t.createEndpoint(null); \t\t\tlistener.onMessage(message); \t} \t\/** \u0438\u0437 Work **\/ \t@Override \tpublic void run() { \t\tserver.start();  \t} \t\/** \u0438\u0437 Work **\/ \t@Override \tpublic void release() { \t\tstop(); \t}  } <\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u0435\u0437\u0434\u0435 \u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u044e\u0442 \u043d\u0435\u043a\u0438\u0435 endpoint&#8217;\u044b. \u0423 \u043c\u0435\u043d\u044f \u0431\u044b\u043b \u0441 \u044d\u0442\u0438\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0442\u044b\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u0443\u044e:<br \/>\n  Endpoint \u2014 \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u0441\u043b\u0443\u0448\u0430\u0435\u0442 \u00ab\u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u00bb \u043f\u043e\u0442\u043e\u043a. \u0418\u043c\u0435\u043d\u043d\u043e \u043a \u043d\u0435\u043c\u0443 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 endpointActication<br \/>\n  MessageEndpoint \u2014 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 MDB, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u043e \u0438\u043b\u0438 \u0438\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0437\u043e\u0432\u043e\u043c MessageEndpointFactory.createEndpoint() ( \u042d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0442\u0440\u0435\u0434\u0430 ). \u041e\u043d \u043b\u0435\u0433\u043a\u043e \u043a\u0430\u0441\u0442\u0438\u0442\u0441\u044f \u043a \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 MDB. <\/p>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432\u0441\u0435. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e BinkpServer \u0437\u0430 \u043d\u0435\u043d\u0430\u0434\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u043f\u0443\u0449\u0443, \u043d\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u0435\u043d, \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u00ab\u0412\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u00bb JCA \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 ( ResourceAdapter, MessageListener, ActivationSpec, Endpoint )<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Endpoint&#8217;\u0430 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445:<br \/>\n  @MessageDriven(messageListenerInterface = BinkpMessageListener.class,  activationConfig = { @ActivationConfigProperty(propertyName = &quot;listenPort&quot;, propertyValue = &quot;24554&quot;) }) public class ReceiveMessageBean implements BinkpMessageListener {  \t@Override \tpublic void onMessage(FidoMessage msg) { \t\t\/\/ do smth with mesaage \t} } <\/p>\n<p>  \u0418\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435<\/p>\n<p>  \u0410 \u0432\u043e\u0442 \u0442\u0443\u0442 \u2014 \u0432\u0441\u0435 \u0432\u0435\u0441\u0435\u043b\u0435\u0435, \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u00ab\u0418\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u00bb JCA \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0430\u0436 \u0438\u0437 8 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0447\u0442\u043e \u0432 2 \u0440\u0430\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u00ab\u0412\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u00bb. \u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e-\u043f\u043e\u0440\u044f\u0434\u043a\u0443.<\/p>\n<p>  META-INF\/ra.xml \u2014 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 ResourceAdapter&#8217;\u0430 \u0438 outbound \u043f\u043e\u0442\u043e\u043a\u043e\u0432<\/p>\n<p>  ra.xml&lt;connector xmlns=&quot;http:\/\/xmlns.jcp.org\/xml\/ns\/javaee&quot;            xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot;            xsi:schemaLocation=&quot;http:\/\/xmlns.jcp.org\/xml\/ns\/javaee            http:\/\/xmlns.jcp.org\/xml\/ns\/javaee\/connector_1_7.xsd&quot;            version=&quot;1.7&quot; metadata-complete=&quot;true&quot;&gt;     &lt;vendor-name&gt;kreon-services&lt;\/vendor-name&gt;    &lt;eis-type&gt;FidoNet&lt;\/eis-type&gt;    &lt;resourceadapter-version&gt;2.5&lt;\/resourceadapter-version&gt;    &lt;resourceadapter&gt; &lt;!&#8212; \u041a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 javax.resource.spi.ResourceAdapter; config-property &#8212; \u043f\u043e\u043b\u044f, \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0447\u0435\u0440\u0435\u0437 \u0433\u0435\u0442\u0442\u0435\u0440\u044b\/\u0441\u0435\u0442\u0442\u0435\u0440\u044b &#8212;&gt;       &lt;resourceadapter-class&gt;in.fidonode.binkp.ra.BinkpServerResourceAdapter&lt;\/resourceadapter-class&gt;       &lt;config-property&gt;          &lt;config-property-name&gt;version&lt;\/config-property-name&gt;          &lt;config-property-type&gt;java.lang.String&lt;\/config-property-type&gt;          &lt;config-property-value&gt;jnode-jee 2.5 binkp\/1.1&lt;\/config-property-value&gt;       &lt;\/config-property&gt; &lt;!&#8212; \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430. \u0412\u0441\u0435\u0433\u0434\u0430 \u041f\u0415\u0420\u0415\u0414 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u043c &#8212;&gt;  &lt;outbound-resourceadapter&gt;          &lt;connection-definition&gt; &lt;!&#8212; \u0424\u0430\u0431\u0440\u0438\u043a\u0430 \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c JEE-\u0441\u0435\u0440\u0432\u0435\u0440, \u043e\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 &#8212;&gt;             &lt;managedconnectionfactory-class&gt;in.fidonode.binkp.ra.ManagedConnectionFactory&lt;\/managedconnectionfactory-class&gt; &lt;!&#8212; \u0424\u0430\u0431\u0438\u043a\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 classpath &#8212;&gt;             &lt;connectionfactory-interface&gt;in.fidonode.binkp.ra.ConnectionFactory&lt;\/connectionfactory-interface&gt;             &lt;connectionfactory-impl-class&gt;in.fidonode.binkp.ra.ConnectionFactoryImpl&lt;\/connectionfactory-impl-class&gt; &lt;!&#8212; \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u0444\u0430\u0431\u0440\u0438\u043a\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 classpath &#8212;&gt;             &lt;connection-interface&gt;in.fidonode.binkp.ra.Connection&lt;\/connection-interface&gt;             &lt;connection-impl-class&gt;in.fidonode.binkp.ra.ConnectionImpl&lt;\/connection-impl-class&gt;          &lt;\/connection-definition&gt; &lt;!&#8212; \u041f\u0440\u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0435\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u0430\u043b\u043c\u0443\u0434, \u044f \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b &#8212;&gt;          &lt;transaction-support&gt;NoTransaction&lt;\/transaction-support&gt;          &lt;reauthentication-support&gt;false&lt;\/reauthentication-support&gt;       &lt;\/outbound-resourceadapter&gt; &lt;!&#8212; \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 &#8212;&gt;       &lt;inbound-resourceadapter&gt; &lt;!&#8212; &#8230; &#8212;&gt;       &lt;\/inbound-resourceadapter&gt;    &lt;\/resourceadapter&gt; &lt;\/connector&gt; <\/p>\n<p>  \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b Connection \u0438 ConnectionFactory \u2014 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432 classpath. \u0421\u0440\u0430\u0437\u0443 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0438\u0445 \u0442\u0443\u0442, \u0442\u0430\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e.<\/p>\n<p>  BinkpClient \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443 \ud83d\ude42<br \/>\n  public interface Connection { \tpublic BinkpClient connect(String hostname, int port); } public interface ConnectionFactory { \tpublic Connection createConnection(); } <\/p>\n<p>  \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0431\u044b\u0432\u0430\u044e\u0442 Managed \u0438 Unmanaged. \u041f\u0435\u0440\u0432\u044b\u0435 \u2014 \u0441\u043e \u0441\u0432\u0438\u0441\u0442\u0435\u043b\u043a\u0430\u043c\u0438, listener&#8217;\u0430\u043c\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u043c, \u0432\u0442\u043e\u0440\u044b\u0435 \u2014 \u0431\u0435\u0437.<br \/>\n  \u041a\u043b\u0430\u0441\u0441, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 ManagedConnectionFactory, \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u043c\u0435\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0431\u0430 \u0442\u0438\u043f\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439.<br \/>\n  ManagedConnectionFactory.javapublic class ManagedConnectionFactory implements \t\tjavax.resource.spi.ManagedConnectionFactory { \tprivate PrintWriter logwriter; \tprivate static final long serialVersionUID = 1L;  \t\/** \t * \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0434\u043b\u044f unmanaged-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \t *\/ \t@Override \tpublic Object createConnectionFactory() throws ResourceException { \t\treturn new ConnectionFactoryImpl(); \t}  \t\/** \t * \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 managed-\u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0434\u043b\u044f managed-connection \t *\/ \t@Override \tpublic Object createConnectionFactory(ConnectionManager cxManager) \t\t\tthrows ResourceException { \t\treturn new ManagedConnectionFactoryImpl(this, cxManager); \t}  \t\/** \t * \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 managed-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \t *\/ \t@Override \tpublic ManagedConnection createManagedConnection(Subject subject, \t\t\tConnectionRequestInfo cxRequestInfo) throws ResourceException { \t\treturn new in.fidonode.binkp.ra.ManagedConnection(); \t}  \t@Override \tpublic PrintWriter getLogWriter() throws ResourceException { \t\treturn logwriter; \t}  \t@SuppressWarnings(&quot;rawtypes&quot;) \t@Override \tpublic ManagedConnection matchManagedConnections(Set connectionSet, \t\t\tSubject subject, ConnectionRequestInfo cxRequestInfo) \t\t\tthrows ResourceException { \t\tManagedConnection result = null; \t\tIterator it = connectionSet.iterator(); \t\twhile (result == null &#038;&#038; it.hasNext()) { \t\t\tManagedConnection mc = (ManagedConnection) it.next(); \t\t\tif (mc instanceof in.fidonode.binkp.ra.ManagedConnection) { \t\t\t\tresult = mc; \t\t\t}  \t\t} \t\treturn result; \t}  \t@Override \tpublic void setLogWriter(PrintWriter out) throws ResourceException { \t\tlogwriter = out;  \t}  } <\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0443 JEE-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440, \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0441\u0438\u0442 ManagedConnectionFactory \u0441\u043e\u0437\u0434\u0430\u0442\u044c ConnectionFactory \u0438 \u043e\u0442\u0434\u0430\u0435\u0442 \u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e. <\/p>\n<p>  \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, ConnectionFactory \u0442\u043e\u0436\u0435 \u0431\u044b\u0432\u0430\u0435\u0442 Managed \u0438 Unmanaged. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0432\u0441\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u0435\u0441\u0442\u0438 \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443, \u043d\u043e \u044d\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0438 \u043a\u0430\u043a \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c, \u0435\u0441\u0442\u044c \u043b\u0438 \u0442\u0430\u043c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438\u0442\u0434.<br \/>\n  ConnectionFactoryIml \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 new ConnectionImpl(), \u0430 \u0432\u043e\u0442 ManagedConnectionFactoryImpl \u0447\u0443\u0442\u044c \u043f\u043e\u0441\u043b\u043e\u0436\u043d\u0435\u0435:<\/p>\n<p>  ManagedConnectionFactoryImpl.javapublic class ManagedConnectionFactoryImpl implements ConnectionFactory { \tprivate ManagedConnectionFactory factory; \tprivate ConnectionManager manager;  \tpublic ManagedConnectionFactoryImpl(ManagedConnectionFactory factory, \t\t\tConnectionManager manager) { \t\tsuper(); \t\tthis.factory = factory; \t\tthis.manager = manager; \t} \/** \u0441\u043e\u0437\u0434\u0430\u0435\u0442 managed-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f-ManagedConnectionFactory **\/ \t@Override \tpublic Connection createConnection() { \t\ttry { \t\t\treturn (Connection) manager.allocateConnection(factory, null); \t\t} catch (ResourceException e) { \t\t\treturn null; \t\t} \t}  } <\/p>\n<p>  ManagedConnection, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 javax.resource.spi.ManagedConnection \u2014 \u044d\u0442\u043e \u043e\u0431\u0435\u0440\u0442\u043a\u0430 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 Connection, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u0430\u043a-\u0440\u0430\u0437 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0432\u0438\u0441\u0442\u0435\u043b\u043e\u043a \u0438 listener&#8217;\u043e\u0432. \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 ManagedConnectionFactory.createManagedConnection(), \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0438\u0437 ManagedConnectionFactoryImpl.createConnection() \u0447\u0435\u0440\u0435\u0437 ConnectionManager.allocateConnection()<\/p>\n<p>  ManagedConnection.javapublic class ManagedConnection implements javax.resource.spi.ManagedConnection { \tprivate PrintWriter logWriter; \tprivate Connection connection; \tprivate List&lt;ConnectionEventListener&gt; listeners;  \tpublic ManagedConnection() { \t\tlisteners = Collections \t\t\t\t.synchronizedList(new ArrayList&lt;ConnectionEventListener&gt;()); \t}  \t@Override \tpublic void associateConnection(Object connection) throws ResourceException { \t\tif (connection != null &#038;&#038; connection instanceof Connection) { \t\t\tthis.connection = (Connection) connection; \t\t} \t}  \t@Override \tpublic Object getConnection(Subject subject, \t\t\tConnectionRequestInfo cxRequestInfo) throws ResourceException { \t\tif (connection == null) { \t\t\tconnection = new ManagedConnectionImpl(); \t\t} \t\treturn connection; \t}  \t@Override \tpublic void cleanup() throws ResourceException {  \t}  \t@Override \tpublic void destroy() throws ResourceException {  \t}  \t@Override \tpublic PrintWriter getLogWriter() throws ResourceException { \t\treturn logWriter; \t}  \t@Override \tpublic ManagedConnectionMetaData getMetaData() throws ResourceException { \t\tthrow new NotSupportedException(); \t}  \t@Override \tpublic XAResource getXAResource() throws ResourceException { \t\tthrow new NotSupportedException(); \t}  \t@Override \tpublic LocalTransaction getLocalTransaction() throws ResourceException { \t\treturn null; \t}  \t@Override \tpublic void setLogWriter(PrintWriter out) throws ResourceException { \t\tlogWriter = out;  \t}  \t@Override \tpublic void addConnectionEventListener(ConnectionEventListener listener) { \t\tif (listener != null) { \t\t\tlisteners.add(listener); \t\t} \t}  \t@Override \tpublic void removeConnectionEventListener(ConnectionEventListener listener) { \t\tif (listener != null) { \t\t\tlisteners.remove(listener); \t\t} \t} } <\/p>\n<p>  \u041d\u0443 \u0432\u043e\u0442, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443 \u2014 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \ud83d\ude42<br \/>\n  public class ConnectionImpl implements Connection {  \t@Override \tpublic BinkpClient connect(String hostname, int port) { \t\treturn new BinkpClient(hostname, port); \t}  } <\/p>\n<p>  \u0418\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f<br \/>\n  ManagedConnectionFactory.createConnectionFactory()<br \/>\n  -&gt;ManagedConnectionFactoryImpl.createConnection()<br \/>\n  &#8212;&gt;\u0421onnectionManager.allocateConnection()<br \/>\n  &#8212;&gt;ManagedConnectionFactory.createManagedConnection()<br \/>\n  &#8212;-&gt;ManagedConnection.getConnection()<br \/>\n  &#8212;&#8212;&gt;ManagedConnectionImpl.connect()<\/p>\n<p>  \u041d\u0443 \u0438 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u044d\u0442\u0438\u043c \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u043c, \u043d\u0443 \u0438 jndi \u0443\u043a\u0430\u0437\u0430\u0442\u044c.<\/p>\n<p>  \u041a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430:<br \/>\n  \tprivate BinkpClient createBinkpClient(String host, int port) { \t\tConnectionFactory cf = ((ConnectionFactory) new InitialContext().lookup(&quot;java:eis\/BinkpConnectionFactory&quot;)); \t\tConnection conn = cf.getConnection(); \t\treturn conn.connect(host, port); \t}<br \/>\n  \u0410 \u043f\u0440\u0438\u0447\u0435\u043c \u0442\u0443\u0442 \u0424\u0438\u0434\u043e?<\/p>\n<p>  \u0410 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u043f\u0440\u0438\u0447\u0435\u043c. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0431\u044b\u043b\u0430 \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u043e binkp, \u043d\u043e \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u0439, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043f\u043e\u043f\u0430\u0434\u0430\u043b\u0430 \u043f\u043e\u0434 NDA. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0432\u0448\u0438\u0441\u044c \u0441 JCA \u0438 \u0440\u0435\u0448\u0438\u0432 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 ( \u043a\u0441\u0442\u0430\u0442\u0438, \u043e\u0433\u043b\u044f\u0434\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430\u0437\u0430\u0434 \u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0438\u043a\u0442\u043e \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u0435\u0449\u0435 \u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b. \u0418 \u044d\u0442\u043e \u0435\u0449\u0435 \u0431\u0435\u0437 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439! ), \u044f \u0440\u0430\u0437\u043c\u043e\u0440\u043e\u0437\u0438\u043b \u0441\u0442\u0430\u0440\u0443\u044e \u0438\u0434\u0435\u044e \u2014 \u0444\u043e\u0440\u043a jnode \u0434\u043b\u044f JEE-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u043e\u0434\u044b \u0432 \u0432\u0438\u0434\u0435 \u043e\u0434\u043d\u043e\u0433\u043e ear. \u0412 \u0441\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0437\u043d\u0430\u043d\u0438\u0439 JCA \u043c\u043d\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u043b\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \ud83d\ude42<\/p>\n<p>  \u041f\u043e\u0434 \u044d\u0442\u043e \u0432\u0441\u0435 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u0438 \u043e\u043d\u0438 \u0434\u0430\u0436\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438. \u0422\u0430\u043a \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 java ee \u0432\u043e\u043e\u0431\u0449\u0435 \u0438 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0435 \u0438\u0437 java se \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u2014 \u043f\u0438\u0448\u0438\u0442\u0435 \u043f\u0438\u0441\u044c\u043c\u0430 \u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u044c\u0442\u0435 \u043a\u043e\u0434. \u0414\u0430, \u043f\u043e\u0439\u043d\u0442\u043e\u0432 \u0432\u0441\u0435 \u0435\u0449\u0435 \u0431\u0435\u0440\u0443.<\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043e\u0441\u0442\u0430\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u0441 \u043d\u0430\u043c\u0438. \u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u044f \u0434\u0430\u0436\u0435 \u043d\u0435 \u0441\u043e\u043c\u043d\u0435\u0432\u0430\u044e\u0441\u044c \u0447\u0442\u043e \u0438\u0445 \u0442\u0443\u0442 \u0434\u0435\u0441\u044f\u0442\u043a\u0438.      \t \t   \thttp:\/\/habrahabr.ru\/post\/251131\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\n  \u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a, %username%.<br \/>\n  \u0421\u043a\u0430\u0436\u0443 \u0441\u0440\u0430\u0437\u0443, \u043d\u0430 99% \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0441\u0442 \u043f\u0440\u043e Java EE Connector Architecture, \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043a\u043e\u0434\u0430. \u041e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u043b\u0441\u044f 1% \u043f\u0440\u043e Fidonet \u0432\u044b \u043f\u043e\u0439\u043c\u0435\u0442\u0435 \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435.<\/p>\n<p>  \u0420\u0435\u0437\u044e\u043c\u0435 \u0434\u043b\u044f \u043b\u0435\u043d\u0438\u0432\u044b\u0445JMS \u0438 JCA \u2014 \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u0438, \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 MessageDrivenBean, \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 ConnectionFactory.<br \/>\n  \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u2014 4 \u043a\u043b\u0430\u0441\u0441\u0430, \u0434\u043b\u044f \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u2014 8 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<br \/>\n  \u0414\u0430\u043b\u044c\u0448\u0435 \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0438 \u0431\u043e\u043b\u044c<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u2014 \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>  \u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<br \/>\n  \u041c\u043d\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u043e\u0431 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0441\u0438\u0441\u0442\u0435\u043c\u044b (\u00ab\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0410\u00bb ) \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u043c\u043d\u043e\u0433\u043e \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u00ab\u0441\u0438\u0441\u0442\u0435\u043c\u0430 B\u00bb). \u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0443\u0436\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0435\u043b\u044c\u0437\u044f, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0432\u0435\u043b\u0430\u0441\u044c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043d\u0435\u043a\u043e\u0439 \u0448\u0438\u043d\u044b\/\u043f\u0440\u043e\u043a\u0441\u0438. \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u0442\u0443\u0434\u0430-\u0441\u044e\u0434\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0441 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0435\u0439 \u0438\u0445 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439. <\/p>\n<p>  \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u00ab\u0410\u00bb \u0438\u043c\u0435\u043b\u0430 \u043c\u043d\u043e\u0433\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438, \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043d\u044b \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u044b. \u041f\u043e\u0434 \u044d\u0442\u043e \u0434\u0435\u043b\u043e \u0431\u044b\u043b \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0437\u0430\u043f\u0438\u043b\u0435\u043d \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u043a\u0435\u043b\u0435\u0442 \u0434\u043b\u044f JEE \u2014 JAX-WS+EJB+JMS \u0434\u043b\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<br \/>\n  \u0410 \u0432\u043e\u0442 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u00abB\u00bb \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043d\u0435 \u0431\u044b\u043b\u043e. \u0420\u043e\u0431\u043a\u0438\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0441\u0435\u0442\u044c\u044e \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 EJB \u0443\u0441\u043f\u0435\u0445\u043e\u043c \u043d\u0435 \u0443\u0432\u0435\u043d\u0447\u0430\u043b\u0438\u0441\u044c, \u0433\u0443\u0433\u043b \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u0430\u043b \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b: \u043a\u043e\u0441\u0442\u044b\u043b\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u043b\u0435\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 non-http \u0438\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c JCA-\u0430\u0434\u0430\u043f\u0442\u0435\u0440. \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0443\u0442\u044c \u2014 \u0441 JCA \u044f \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u0430 \u0443\u0437\u043d\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e.<\/p>\n<p>  \u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435<br \/>\n  \u041d\u0430\u0447\u0430\u0432 \u043a\u043e\u043f\u0430\u0442\u044c \u0433\u0443\u0433\u043b, \u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0431\u043b\u043e\u043c\u0430\u043b\u0441\u044f. \u0412\u0435\u0437\u0434\u0435 \u043f\u0438\u0441\u0430\u043b\u0438, \u0427\u0422\u041e \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c ( \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u043e\u0440, \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440, \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u0438\u0442\u0434 ), \u043d\u043e \u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u043f\u0438\u0441\u0430\u043b\u0438, \u041a\u0410\u041a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u00ab\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0447\u0443\u0436\u043e\u0439 \u043a\u043e\u0434 \u0438 \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u00bb \u0434\u0430\u043b \u0441\u0431\u043e\u0439 \u2014 \u0447\u0443\u0436\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0431\u044b\u043b \u0442\u0430\u043a\u043e\u0439 \u043c\u0438\u0437\u0435\u0440, \u0447\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043c\u043d\u0435 \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c.<\/p>\n<p>  \u0421\u043f\u0430\u0441\u043b\u0438 \u043c\u0435\u043d\u044f \u0434\u0432\u0435 \u0432\u0435\u0449\u0438: JSR 322 \u0438 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0433\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u043d\u0430 google code. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044d\u0442\u043e \u0438 \u0441\u0442\u0430\u043b\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u2014 \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0437 jca-sockets \u0438 \u043e\u0442\u043a\u0440\u044b\u0432 pdf, \u044f \u043d\u0430\u0447\u0430\u043b \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0438 \u043f\u0443\u0442\u0435\u043c \u043d\u0430\u0443\u0447\u043d\u043e\u0433\u043e \u0442\u044b\u043a\u0430 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u043e\u043d\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>  \u041f\u043e\u0442\u0440\u0430\u0442\u0438\u0432 \u043e\u043a\u043e\u043b\u043e 16 \u0447\u0430\u0441\u043e\u0432 \u043d\u0430 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b, \u044f \u0432\u044b\u044f\u0441\u043d\u0438\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p>  JCA-\u043c\u043e\u0434\u0443\u043b\u044c \u0438\u043c\u0435\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0431\u044f \u0434\u0432\u0435 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0447\u0430\u0441\u0442\u0438: \u00ab\u0412\u0445\u043e\u0434\u044f\u0449\u0438\u0435\u00bb \u0438 \u00ab\u0418\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435\u00bb. \u042d\u0442\u0438 \u0447\u0430\u0441\u0442\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u0432\u043c\u0435\u0441\u0442\u0435, \u0442\u0430\u043a \u0438 \u043f\u043e-\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0438\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e. \u0421\u0430\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0442\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u043c, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u043c javax.resource.spi.ResourceAdapter \u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0432 META-INF\/ra.xml, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c ResourceAdapter \u043d\u0443\u0436\u0435\u043d \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0412\u0445\u043e\u0434\u044f\u0449\u0438\u043c\u0438; \u0414\u043b\u044f \u0418\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0438 \u0435\u0433\u043e \u0441\u043a\u0435\u043b\u0435\u0442 \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c.<\/p>\n<p>  \u0412\u0445\u043e\u0434\u044f\u0449\u0438\u0435<br \/>\n  \u0412\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043a\u0430\u043d\u0430\u043b \u0431\u0438\u043d\u0434\u0438\u0442\u0441\u044f \u043a MessageEndpoint&#8217;\u0443 ( \u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e @MessageDrivenBean; \u0434\u0430-\u0434\u0430, JCA \u044d\u0442\u043e \u043a\u0438\u0448\u043a\u0438 JMS ) \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f ActivationSpec&#8217;\u043e\u043c.<br \/>\n  META-INF\/ra.xml \u2014 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 ResourceAdapter&#8217;\u0430 \u0438 inbound \u043f\u043e\u0442\u043e\u043a\u043e\u0432<br \/>\n  ra.xml&lt;connector xmlns=&quot;http:\/\/xmlns.jcp.org\/xml\/ns\/javaee&quot;            xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot;            xsi:schemaLocation=&quot;http:\/\/xmlns.jcp.org\/xml\/ns\/javaee            http:\/\/xmlns.jcp.org\/xml\/ns\/javaee\/connector_1_7.xsd&quot;            version=&quot;1.7&quot; metadata-complete=&quot;true&quot;&gt;     &lt;vendor-name&gt;kreon-services&lt;\/vendor-name&gt;    &lt;eis-type&gt;FidoNet&lt;\/eis-type&gt;    &lt;resourceadapter-version&gt;2.5&lt;\/resourceadapter-version&gt;    &lt;resourceadapter&gt; &lt;!&#8212; \u041a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 javax.resource.spi.ResourceAdapter; config-property &#8212; \u043f\u043e\u043b\u044f, \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0447\u0435\u0440\u0435\u0437 \u0433\u0435\u0442\u0442\u0435\u0440\u044b\/\u0441\u0435\u0442\u0442\u0435\u0440\u044b &#8212;&gt;       &lt;resourceadapter-class&gt;in.fidonode.binkp.ra.BinkpServerResourceAdapter&lt;\/resourceadapter-class&gt;       &lt;config-property&gt;          &lt;config-property-name&gt;version&lt;\/config-property-name&gt;          &lt;config-property-type&gt;java.lang.String&lt;\/config-property-type&gt;          &lt;config-property-value&gt;jnode-jee 2.5 binkp\/1.1&lt;\/config-property-value&gt;       &lt;\/config-property&gt; &lt;!&#8212; \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 &#8212;&gt;       &lt;inbound-resourceadapter&gt;          &lt;messageadapter&gt;             &lt;messagelistener&gt; &lt;!&#8212; \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c @MessageDrivenBean \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u044d\u0442\u043e\u0433\u043e \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430 &#8212;&gt;                &lt;messagelistener-type&gt;in.fidonode.binkp.ra.BinkpMessageListener&lt;\/messagelistener-type&gt;                &lt;activationspec&gt; &lt;!&#8212; \u041a\u043b\u0430\u0441\u0441-\u0445\u043e\u043b\u0434\u0435\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 @ActivationConfigProperty, \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0433\u0435\u0442\u0442\u0435\u0440\u044b \u0438 \u0441\u0435\u0442\u0442\u0435\u0440\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 &#8212;&gt;                   &lt;activationspec-class&gt;in.fidonode.binkp.ra.BinkpActivationSpec&lt;\/activationspec-class&gt; &lt;!&#8212; \u0421\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 &#8212;&gt;                   &lt;required-config-property&gt;                      &lt;config-property-name&gt;listenPort&lt;\/config-property-name&gt;                   &lt;\/required-config-property&gt; &lt;!&#8212; \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 &#8212;&gt;                   &lt;config-property&gt;                      &lt;config-property-name&gt;listenPort&lt;\/config-property-name&gt;                      &lt;config-property-type&gt;java.lang.Integer&lt;\/config-property-type&gt;                      &lt;config-property-value&gt;24554&lt;\/config-property-value&gt;                   &lt;\/config-property&gt;                &lt;\/activationspec&gt;             &lt;\/messagelistener&gt;          &lt;\/messageadapter&gt;       &lt;\/inbound-resourceadapter&gt;    &lt;\/resourceadapter&gt; &lt;\/connector&gt; <\/p>\n<p>  \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 BinkpMessageListener \u2014 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432 classpath;<\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0435\u0433\u043e \u0442\u0443\u0442:<br \/>\n  public interface BinkpMessageListener { \tpublic void onMessage(FidoMessage message); } <\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e ResourceAdapter<br \/>\n  BinkpServerResourceAdapter.javapublic class BinkpServerResourceAdapter implements ResourceAdapter, Serializable {  \tprivate static final long serialVersionUID = 1L; \tprivate static Logger log = Logger.getLogger(BinkpServerResourceAdapter.class \t\t\t.getName()); \tprivate ConcurrentHashMap&lt;BinkpActivationSpec, BinkpEndpoint&gt; activationMap =  \t\t\tnew ConcurrentHashMap&lt;BinkpActivationSpec, BinkpEndpoint&gt;(); \tprivate BootstrapContext ctx; \tprivate String version;  \t@Override \tpublic void endpointActivation(MessageEndpointFactory endpointFactory, \t\t\tActivationSpec spec) throws ResourceException { \t\tBinkpEndpoint activation = new BinkpEndpoint(ctx.getWorkManager(), \t\t\t\t(BinkpActivationSpec) spec, endpointFactory); \t\tactivationMap.put((BinkpActivationSpec) spec, activation); \t\tactivation.start();  \t\tlog.info(&quot;endpointActivation(&quot; + activation + &quot;)&quot;);  \t} \t@Override \tpublic void endpointDeactivation(MessageEndpointFactory endpointFactory, \t\t\tActivationSpec spec) { \t\tBinkpEndpoint activation = activationMap.remove(spec); \t\tif (activation != null) \t\t\tactivation.stop();  \t\tlog.info(&quot;endpointDeactivation(&quot; + activation + &quot;)&quot;);  \t} \t@Override \tpublic void start(BootstrapContext ctx) \t\t\tthrows ResourceAdapterInternalException { \t\tthis.ctx = ctx; \t\tlog.info(&quot;start()&quot;);  \t} \t@Override \tpublic void stop() { \t\tfor (BinkpEndpoint act : activationMap.values()) { \t\t\tact.stop(); \t\t} \t\tactivationMap.clear(); \t\tlog.info(&quot;stop()&quot;); \t}  \t@Override \tpublic XAResource[] getXAResources(ActivationSpec[] arg0) \t\t\tthrows ResourceException { \t\treturn null; \t}  \tpublic String getVersion() { \t\treturn version; \t}  \tpublic void setVersion(String version) { \t\tthis.version = version; \t}  } <\/p>\n<p>  \u0427\u0442\u043e \u0442\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442? \u041f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 JCA-\u043c\u043e\u0434\u0443\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 BinkpServerResourceAdapter, \u0443 \u043d\u0435\u0433\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b ( \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u043f\u043e\u043b\u0435 version) \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 start().<br \/>\n  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 start() \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e, \u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u043d\u0435\u0433\u043e \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c WorkManager&#8217;\u0430.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 @MessageDrivenBean, \u043e\u043d \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u0430\u0434\u0430\u043f\u0442\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u0442\u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0431\u0438\u043d. \u0414\u043b\u044f JMS \u044d\u0442\u043e MessageListener, \u0443 \u043d\u0430\u0441 \u044d\u0442\u043e BinkpMessageListener. \u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f ActivationSpec ( \u0443 \u043d\u0430\u0441 \u044d\u0442\u043e BinkpActivationSpec, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 javax.resource.spi.ActivationSpec), \u043f\u043e\u043b\u044f \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u0432 activationConfig, \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f MessageEndpointFactory \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f ResourceAdapter.endpointActivation(). \u0412 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u043e\u0442 \u00ab\u0441\u0435\u0440\u0432\u0435\u0440\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u0431\u0443\u0434\u044c \u0442\u043e tcp\/ip \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u043b\u0438 \u043f\u043e\u0442\u043e\u043a \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 unix-socket, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0432 MDB. \u041a\u043b\u0430\u0441\u0441 BinkpEndpoint \u2014 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u00ab\u0441\u0435\u0440\u0432\u0435\u0440\u00bb.<br \/>\n  BinkpEndpoint.javapublic class BinkpEndpoint implements Work, FidoMessageListener { \tprivate static final Logger logger = Logger.getLogger(BinkpEndpoint.class \t\t\t.getName()); \tprivate BinkpServer server; \tprivate final WorkManager workManager; \tprivate final MessageEndpointFactory messageEndpointFactory;  \tpublic BinkpEndpoint(WorkManager workManager, \t\t\tBinkpActivationSpec activationSpec, \t\t\tMessageEndpointFactory messageEndpointFactory) { \t\tthis.workManager = workManager; \t\tthis.messageEndpointFactory = messageEndpointFactory; \t\tserver = new BinkpServer(activationSpec.getListenPort(), this); \t}  \tpublic void start() throws ResourceException { \t\tworkManager.scheduleWork(this); \t}   \tpublic void stop() { \t\t\tif (server != null) { \t\t\t\tserver.stop(); \t\t\t} \t} \t\/** \u0438\u0437 FidoMessageListener **\/ \t@Override \tpublic Message incomingMessage(FidoMessage message) { \t\t\tString message = msg.encode(); \t\t\tBinkpMessageListener listener = (BinkpMessageListener) messageEndpointFactory \t\t\t\t\t.createEndpoint(null); \t\t\tlistener.onMessage(message); \t} \t\/** \u0438\u0437 Work **\/ \t@Override<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-252108","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/252108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=252108"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/252108\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=252108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=252108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=252108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}