首页 \ 问答 \ 到EJB3与否?(To EJB3 or not?)

到EJB3与否?(To EJB3 or not?)

我有一个架构场景,我想讨论以获得您的意见。

我可以在这两者之间做出选择(这是对我施加的限制)

  1. 使用EJB3 + JPA - 没有Spring / Hibernate
  2. POJO + JDBC - 再次没有Spring / Hibernate

我有一系列需要集成的Web应用程序(只有内部网)。 在数据库级别,将有3到4个oracle数据库(每个数据库大约40到50个表)。 对于某些查询,某些应用程序可能与多个数据库交互。 并发用户数量将小于100.每个应用程序的用户/受众数量范围为10到6000(最大)。

所有应用程序都将部署在一台服务器上,数据库和服务器很可能位于同一台机器上。

大多数用例将基于CRUD(一些可以为ORM提供良好的域模型,而另一些可能不提供),具有一些业务流程,自动化作业等。未来可能需要与SAP集成以用于某些应用程序。

您是否认为在这种情况下EJB3会使应用程序更具可扩展性或仅增加复杂性? 如果我使用POJO进行设计,那么这个应用程序我不想在没有充分理由的情况下增加复杂性。 我试图游说Spring和Hibernate但没有成功。

如果您需要更多详细信息,请与我们联系

编辑:我忘了提到应用程序服务器。 这是WAS 7。


I have an architecture scenario and I would like to discuss to get your opinion.

I can choose between these two (this is a constraint imposed on me)

  1. Use EJB3+JPA - no Spring/Hibernate
  2. POJO + JDBC - again no Spring/Hibernate

I have series of web applications (only intranet) that all need to be integrated. At database level, there will be 3 to 4 oracle databases (and about 40 to 50 tables per database). Some applications may interact with more than one database for some queries. Number of concurrent user(s) will be less than 100. User/audience per application will range from 10 to 6000 (max).

All applications will be deployed on one server, and it's very likely that database and server could be on the same machine.

Most of the use cases will be CRUD based (some can offer a good domain model for an ORM while others may not), with some business process, automated jobs etc There may be a future need to integrate with SAP for some applications.

Do you think EJB3 in this case will make the application more scalable or just add complexity? If I design with POJO, will an application of this I don't want to add complexity for no good reason. I tried to lobby for Spring and Hibernate but no success.

let me know if you need more details.

EDIT: I forgot to mention the application server. it's WAS 7.


原文:https://stackoverflow.com/questions/1105020
更新时间:2023-12-07 21:12

最满意答案

如上面的注释所述,解决方案是在调用XamlReader.Load并同时删除类型映射器和上下文之前手动加载程序集:

Assembly.Load("MyLibrary");
var rootNode = XamlReader.Load(memeoryStream) as FrameworkElement

我会假设,因为XamlTypeMapper是用程序集列表初始化的,所以这个类负责加载程序集(也许它是),但是AddMappingProccessingInstruction的行为阻止了它的工作。


As mentioned in the comments above, the solution is to manually load the assembly before invoking XamlReader.Load and removing the type mapper and context all together:

Assembly.Load("MyLibrary");
var rootNode = XamlReader.Load(memeoryStream) as FrameworkElement

I would have assumed since the XamlTypeMapper is initialized with a list of assemblies, that this class would be responsible for loading the assembly (and maybe it is) but the behaviour of AddMappingProccessingInstruction prevents this from working.

相关问答

更多

相关文章

更多

最新问答

更多
  • 如何在Laravel 5.2中使用paginate与关系?(How to use paginate with relationships in Laravel 5.2?)
  • linux的常用命令干什么用的
  • 由于有四个新控制器,Auth刀片是否有任何变化?(Are there any changes in Auth blades due to four new controllers?)
  • 如何交换返回集中的行?(How to swap rows in a return set?)
  • 在ios 7中的UITableView部分周围绘制边界线(draw borderline around UITableView section in ios 7)
  • 使用Boost.Spirit Qi和Lex时的空白队长(Whitespace skipper when using Boost.Spirit Qi and Lex)
  • Java中的不可变类(Immutable class in Java)
  • WordPress发布查询(WordPress post query)
  • 如何在关系数据库中存储与IPv6兼容的地址(How to store IPv6-compatible address in a relational database)
  • 是否可以检查对象值的条件并返回密钥?(Is it possible to check the condition of a value of an object and JUST return the key?)
  • GEP分段错误LLVM C ++ API(GEP segmentation fault LLVM C++ API)
  • 绑定属性设置器未被调用(Bound Property Setter not getting Called)
  • linux ubuntu14.04版没有那个文件或目录
  • 如何使用JSF EL表达式在param中迭代变量(How to iterate over variable in param using JSF EL expression)
  • 是否有可能在WPF中的一个单独的进程中隔离一些控件?(Is it possible to isolate some controls in a separate process in WPF?)
  • 使用Python 2.7的MSI安装的默认安装目录是什么?(What is the default installation directory with an MSI install of Python 2.7?)
  • 寻求多次出现的表达式(Seeking for more than one occurrence of an expression)
  • ckeditor config.protectedSource不适用于editor.insertHtml上的html元素属性(ckeditor config.protectedSource dont work for html element attributes on editor.insertHtml)
  • linux只知道文件名,不知道在哪个目录,怎么找到文件所在目录
  • Actionscript:检查字符串是否包含域或子域(Actionscript: check if string contains domain or subdomain)
  • 将CouchDB与AJAX一起使用是否安全?(Is it safe to use CouchDB with AJAX?)
  • 懒惰地初始化AutoMapper(Lazily initializing AutoMapper)
  • 使用hasclass为多个div与一个按钮问题(using hasclass for multiple divs with one button Problems)
  • Windows Phone 7:检查资源是否存在(Windows Phone 7: Check If Resource Exists)
  • 无法在新线程中从FREContext调用getActivity()?(Can't call getActivity() from FREContext in a new thread?)
  • 在Alpine上升级到postgres96(/ usr / bin / pg_dump:没有这样的文件或目录)(Upgrade to postgres96 on Alpine (/usr/bin/pg_dump: No such file or directory))
  • 如何按部门显示报告(How to display a report by Department wise)
  • Facebook墙贴在需要访问令牌密钥后无法正常工作(Facebook wall post not working after access token key required)
  • Javascript - 如何在不擦除输入的情况下更改标签的innerText(Javascript - how to change innerText of label while not wiping out the input)
  • WooCommerce / WordPress - 不显示具有特定标题的产品(WooCommerce/WordPress - Products with specific titles are not displayed)