weblogic-ejb-jar.xml的元素解析 |
Fri Oct 10 23:42:00 CST 2008发表于BlogJava-首页技术区 |
|
做EJB开发,那是几年前的事儿了。虽然EJB2.0一直为开发者所诟病,但它毕竟还是有其自身的优势,比如事务、安全管理,实例生命周期管理等,当然核心还是其提供的分布计算。在EJB规范之外,作为Application Server Vendor,BEA还在规范基础上提供了不少扩展属性,这些属性不是规范要求的,但它提供了额外的功能,对于开发者而言,还是大有用处的。 这些元素可以在weblogic-ejb-jar.xml中配置,下面我们就逐个看看这些元素的含义、作用, 参考文档位于: http://e-docs.bea.com/wls/docs81/ejb/DDreference-ejb-jar.html#1107234
allows-concurrent-calls :只能用于stateful session bean,表明业务方法是否支持并发访问。规范中要求ejb container,如果出现对stateful session bean并发访问,则抛出remote exception。weblogic对其作了增强, allows-concurrent-calls设为true的时候,并发访问进入时, ejb container可以block该请求,直到前面的方法调用结束。默认为false。
|
| 阅读全文... |
本站相关内容:(RSS) |
Enum Serialization with Weblogic EJB ClientUncommented Bytes (43 reads) I was trying to setup an ejb client to connect to an ejb running on a Weblogic 9 app server. I could connect fine, but kept getting a Mismatched serialization uids error on a Java 5 Enum class. After some digging I found a fix on JavaRanch. For whatever reason using the wlclient.jar will not work when serializing enums, but using the full blown weblogic.jar is fine. I'm going to ignore the |
EJB 3 In Action Examples on WebLogic 10Several readers requested me to provide the code examples of EJB 3 in Action for BEA WebLogic 10. We have earlier provided examples for Glassfish, Oracle Application Server and JBoss. I spent sometime last weekend to port these examples to Weblogic 10. You can download examples for first four chapters. These examples have been modified to run on the default examplesServer on the Weblogic in the default server domain. To run the examples, first the set the environment variables by the running the SetExamplesEnv script in $BEA_HOME/wlserver_10.0/samples/domains/wl_server directory. For example, if you are running on Windows and you have installed WebLogic 10 in C:beawlserver_10.0 directory you can run the script as follows: C:beawlserver_10.0samplesdomainswl_serverSetExamplesEnv.bat If you unzipped the samples in c:WLS examples change directory to chapter 1 and you can build and deploy as follows: cd c:WLS exampleschapter1 ant - -> attempts to build and deploy in the examplesServer To run the example: ant run You must be wondering what are the changes that I made in the to run on WebLogic 10. Java EE promises write once run anywhere ! Then why I had to make changes in the code? Every application server has its minor quirks here and there and code changes were very minimal. I could not make dependency injection work in the application client code in WebLogic 10, not sure they support it. So I had to change thick client to make use JNDI lookup instead. I modified the Session bean code to define a global JNDI name for the HelloUser session bean as follows: @Stateless(mappedName="HelloUser") public class HelloUserBean implements HelloUser I modified the client code to lookup the remote EJB as follows: Context ctx = new InitialContext(); helloUser = (HelloUser) ctx.lookup("HelloUser#ejb3inaction.example.HelloUser"); As you would expect, I updated the jndi.properties in the client jar file to have right environment properties for WebLogic as follows: java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory java.naming.provider.url=t3://localhost:7001
That's it .. In the next blog entry, I will discuss the code changes the instructions to run Chapter 2-4 and outline changes made to run JPA and MDB examples. |
EJB 3 In Action Code Examples on WebLogic 10In my previous blog, I made the code examples available for first four chapters of EJB 3 In Action for WebLogic 10. However I did not provide you instructions to run these examples (Chapter 2-4) for WebLogic 10.
Chapter 3 depends upon a JDBC DataSource and Chapter 4 uses JDBC DataSource and a JMS Queue.
%BEA_HOME%/wlserver_10.0/samples/domains/wl_server/setExamplesEnv
cd c:ejb3inactionweblogic ant CreateResources This will configure resources such as JDBC DataSource, JMS Connection Factory, Queues, etc. 4. To deploy the application, you can use WLS Admin Console. If you prefer you can use ant to deploy the application for a specific chapter. cd chapter2
ant run |
互联网相关内容: |
| Enum Serialization with Weblogic EJB Client (2008年07月31日) |
| ONJava.com -- Migrating a WebLogic EJB Application to JBoss (2007年11月15日) |
| EJB 3 In Action Examples on WebLogic 10 (2008年03月25日) |
| EJB 3 In Action Code Examples on WebLogic 10 (2008年04月29日) |
| EJB 2 (Enterprise JavaBeans) mit JBoss und BEA WebLogic (2007年12月11日) |
| EJB 3, JPA, Web Services and Spring Examples for WebLogic Server (2008年06月20日) |
| EJB 3, JPA, Web Services and Spring Examples for WebLogic Server (2008年06月20日) |




