关于EJB的Clustering

niuniu80 2003-08-30 12:36:52
我们知道,EJB的clustering可以把多个客户端的请求在集群结点中进行分配,
以达到负载均衡和fail-over,请问对于单一的计算任务,比如某一个客户端提交
的计算任务,但是仍然很繁重,这种情况下,clustering能不能把这个任务提交到
集群中的众多结点上进行协同计算?
如果不行,是不是意味着EJB架构无法进行单一计算任务的协同解决?
...全文
36 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
Java是一种广泛使用的面向对象的编程语言,由Sun Microsystems公司于1995年5月正式发布。它的设计目标是“一次编写,到处运行(Write Once, Run Anywhere)”,这意味着开发者可以使用Java编写应用程序,并在支持Java的任何平台上无需重新编译即可运行,这得益于其独特的跨平台性,通过Java虚拟机(JVM)实现不同操作系统上的兼容。 Java的特点包括: 面向对象:Java全面支持面向对象的特性,如封装、继承和多态,使得代码更易于维护和扩展。 安全:Java提供了丰富的安全特性,如禁止指针运算、自动内存管理和异常处理机制,以减少程序错误和恶意攻击的可能性。 可移植性:Java字节码可以在所有安装了JVM的设备上执行,从服务器到嵌入式系统,再到移动设备和桌面应用。 健壮性与高性能:Java通过垃圾回收机制确保内存的有效管理,同时也能通过JIT编译器优化来提升运行时性能。 标准库丰富:Java拥有庞大的类库,如Java SE(Java Standard Edition)包含基础API,用于开发通用应用程序;Java EE(Java Enterprise Edition)提供企业级服务,如Web服务、EJB等;而Java ME(Java Micro Edition)则针对小型设备和嵌入式系统。 社区活跃:Java有着全球范围内庞大的开发者社区和开源项目,持续推动技术进步和创新。 多线程支持:Java内建对多线程编程的支持,使并发编程变得更加简单直接。 动态性:Java可以通过反射、注解等机制实现在运行时动态加载类和修改行为,增加了程序的灵活性。 综上所述,Java凭借其强大的特性和广泛的适用范围,在企业级应用、互联网服务、移动开发等领域均扮演着举足轻重的角色,是现代软件开发不可或缺的重要工具之一。
Table of Contents Preface 1 Chapter 1: Getting Started with Geronimo 7 Motivation behind the Geronimo project 7 Constituent projects 8 Apache Geronimo architecture 11 Downloading and running Apache Geronimo 12 Geronimo Administration Console 14 Information portlet 15 Java System Info portlet 15 Server Logs portlet 15 Web Server portlet 16 JMS Server portlet 16 Repository portlet 16 JMS Resources portlet 16 Database Pools portlet 16 Deploy New portlet 16 Plan Creator portlet 17 Plugins portlet 17 Applications portlets 17 Users and Groups portlet 17 DB Info portlet 18 DB Manager portlet 18 Building Geronimo 18 Contributing to Geronimo 20 Java EE 5 development tools 20 Java EE 5 samples 20 Summary 21 Chapter 2: Geronimo Architecture 23 Inversion of Control and dependency injection 24 GBeans 28 Configurations 30 This material is copyright and is licensed for the sole use by Jillian Fraser on 20th November 2009 111 Sutter Street, Suite 1800, San Francisco, , 94104 Download at WoweBook.Com Table of Contents [ ii ] Dependencies 31 High-level architecture 32 Class loader architecture 35 Modifying default class loading behavior 36 Important modules 37 Server directory structure 40 Deployment architecture 42 Deployer 42 Repository 43 Configuration builder 43 Module builder 44 Module builder extension 45 Naming builder 46 Hot deployment 46 Deployment watcher 47 Plugins 47 Plugin catalog and plugin repository 47 Custom server assemblies 48 Extensible Administration Console 48 Summary 48 Chapter 3: Database Connectivity 49 Database pool scopes 50 Creating a server-wide database pool 51 Using the Administration Console Wizard 51 Installing unlisted drivers 55 Using the Deploy New portlet 56 Using the command-line deployer 61 Using GShell 62 Creating an application-scoped database pool 62 Creating a client-scoped pool 64 Editing an existing pool 66 Importing a pool from another application server 67 Creating an XA pool 69 Using a database pool in an application 70 Accessing a server-scoped database pool 70 Accessing an application-scoped database pool from the same application 74 Accessing an application-scoped database pool from a different application 74 Summary 74 This material is copyright and is licensed for the sole use by Jillian Fraser on 20th November 2009 111 Sutter Street, Suite 1800, San Francisco, , 94104 Download at WoweBook.Com Table of Contents [ iii ] Chapter 4: JMS Connectivity 75 Message broker configuration 75 GBean configuration 76 Using the Administration Console 78 JMS resource scopes 78 Creating JMS resources 78 Creating Server-wide JMS resources 79 Using the Administration Console Wizard 79 Using the Deploy New portlet 86 Using the command-line deployer 86 Using GShell 86 Creating application-scoped JMS resources 86 Creating application client-scoped JMS resources 89 Using JMS resources in an application 90 Connecting to a different provider 94 Summary 94 Chapter 5: Java EE Application Deployment 95 Deployment of applications 96 Deployment descriptors 96 Deployment plans 97 The deploy tool 98 Deployment from the Administration Console 100 Deployment through GShell 100 Web modules 100 Servlet 100 Filter 101 Listener 102 Web deployment descriptor 105 Annotations 106 Resource annotation 106 EJB annotation 107 Web deployment plan 108 Tomcat specific configuration 110 Jetty specific configuration 111 Sample web application 112 EJB applications 112 Annotations 113 EJB deployment plan 116 Sample EJB application 118 Deploy the JMS resources 120 Deploy the EJB sample 120 Deploy the Web application 120 This material is copyright and is licensed for the sole use by Jillian Fraser on 20th November 2009 111 Sutter Street, Suite 1800, San Francisco, , 94104 Download at WoweBook.Com Table of Contents [ iv ] JPA Applications 120 Annotations 122 Container-managed persistence 122 CMP sample application 122 Bean-managed persistence 124 BMP sample application 125 Enterprise applications 127 Deployment plan 127 Application clients 129 Deployment plan 130 JavaMail 134 Web Services 135 EAR sample application 137 Deploying an EJB web service 140 Transactions 142 Container-managed transactions 142 Annotations 143 TransactionManagement 143 TransactionAttribute 144 Bean-managed transactions 144 Support in Geronimo 145 Setting transaction timeout 145 Transaction isolation levels 145 Transactions in web applications 146 Summary 148 Chapter 6: Security 149 Overview of security standards 149 Java Authentication and Authorization Service (JAAS) 150 Java Authorization Contract for Containers (JACC) 150 The Common Secure Interoperability Version 2 (CSIv2) protocol 150 Securing the server directory 150 Securing the Administration Console, JMX server, and deployer 151 Securing the embedded Derby database 152 Updating database pools 153 Cryptographic security 154 Keystores 154 Keystores portlet 155 Creating a new keystore 156 Viewing the contents of a keystore 156 Adding a private key 157 Adding a trusted certificate 158 Deleting a private key or trusted certificate 159 Changing a keystore password 159 This material is copyright and is licensed for the sole use by Jillian Fraser on 20th November 2009 111 Sutter Street, Suite 1800, San Francisco, , 94104 Download at WoweBook.Com Table of Contents [ v ] Unlocking keystore for availability 159 Unlocking a keystore for editing 160 Locking a keystore for editing or availability 160 View private key details 161 Changing a Private Key password 161 Generating CSR for a Private Key 161 Importing the CA Reply for a Private Key 162 Preparing a keystore for use with SSL 162 Certificate Authority portlet 164 Protecting passwords 164 HTTPS connectors 164 Tomcat HTTPS connectors 165 Jetty HTTPS connectors 166 JAAS login modules 166 Login modules for authentication 166 PropertiesFile login module 167 SQL login module 168 LDAP login module 169 CertificatePropertiesFile login module 171 Using custom login modules 172 Special purpose login modules 172 FileAudit login module 172 RepeatedFailureLockout login module 173 GeronimoPasswordCredential login module 173 NamedUsernamePasswordCredential login module 173 Security realms 174 Creating a security realm 174 Using the Security Realms portlet 174 Security realm deployment plan 179 Principal wrapping 180 Application security 180 Configuring web application security 180 Running the sample web application 185 Configuring EJB application security 185 Defining security roles in the deployment descriptor 185 Declaring method permissions in the deployment descriptor 186 Using annotations to define roles and permissions 188 Mapping principals to roles in the EJB deployment plan 189 Running the EJB sample application 190 Configuring entity bean security 191 Run-as and default subjects 192 Credential store 192 Configuring an application to use a credential store 193 Configuring run-as and default subjects 194 Running a sample EJB application with run-as 195 Configuring message-driven bean security 196 This material is copyright and is licensed for the sole use by Jillian Fraser on 20th November 2009 111 Sutter Street, Suite 1800, San Francisco, , 94104 Download at WoweBook.Com Table of Contents [ vi ] Configuring EAR application security 196 Application-scoped security realms 196 Single sign-on (SSO) 196 Replacing the default security realm 197 Summary 197 Chapter 7: CORBA 199 CORBA concepts 199 ORB 199 Naming service 199 Security services 200 Support in Geronimo 200 Exposing EJBs through CORBA 200 Creating a Target Security Service (TSS) 200 SSL 202 Authentication mechanism 203 Identity Tokens 204 Configuring EJB to use TSS 205 Sample application exposing EJBs through CORBA 205 Deploying and running the sample EJB application 209 Referencing EJBs through CORBA 209 Creating a Client Security Service (CSS) 209 SSL 211 Authentication mechanism 212 Identity tokens 213 Configuring the EJB reference to use CSS 214 Sample web application accessing CORBA EJBs 214 Sample CSS 215 Deploying and running the sample 217 Summary 217 Chapter 8: Naming and JNDI 219 Application local JNDI context 219 resource-ref 221 resource-env-ref 222 ejb-ref 222 ejb-local-ref 223 service-ref 224 message-destination-ref 225 persistence-context-ref 226 persistence-unit-ref 227 gbean-ref 228 This material is copyright and is licensed for the sole use by Jillian Fraser on 20th November 2009 111 Sutter Street, Suite 1800, San Francisco, , 94104 Download at WoweBook.Com Table of Contents [ vii ] Global JNDI 228 Summary 229 Chapter 9: Geronimo Plugins 231 Developing a plugin 231 Creating a plugin project 232 Installing a plugin 236 Available plugins 237 Pluggable Administration Console 237 Architecture 238 Developing an Administration Console extension 238 Plugins portlet 243 Custom server assemblies and server profiles 245 Summary 247 Chapter 10: Administration 249 Administration Console 249 Server portlets 251 Information portlet 251 Java System Info portlet 252 Server Logs portlet 252 Shutdown portlet 252 Web Server portlet 253 Thread Pools portlet 253 Apache HTTP portlet 253 JMS Server portlet 253 Monitoring portlet 253 Services portlets 253 Repository portlet 254 Database Pools portlet 254 JMS Resources portlet 255 Applications portlets 255 Deploy New portlet 255 System Modules portlet 256 Web App WARs portlet 256 EJB JARs portlet 256 Application EARs portlet 256 J2EE connectors portlet 257 App Clients portlet 257 Plan Creator portlet 257 Embedded DB portlets 258 DB Info portlet 258 DB Manager portlet 258 Debug Views portlets 260 JMX Viewer portlet 260 LDAP Viewer portlet 261 This material is copyright and is licensed for the sole use by Jillian Fraser on 20th November 2009 111 Sutter Street, Suite 1800, San Francisco, , 94104 Download at WoweBook.Com Table of Contents [ viii ] ClassLoader Viewer portlet 263 JNDI Viewer portlet 265 Dependency Viewer portlet 267 Web Server administration 268 HTTP connectors 269 HTTPS connectors 271 AJP connectors 273 Web Server Logs 274 JMS server administration 275 JMS listeners 275 Monitoring the server 276 Adding a Server 277 Adding a Graph 279 Creating a new view 280 GShell 282 Starting and exiting GShell 282 Getting help 283 Supported commands 283 Summary 287 Chapter 11: Geronimo Eclipse Plugin 289 Eclipse and the web tools framework 290 Download and installation 290 GEP download and installation 292 Developing an application in GEP 298 Deploying and running or debugging the application in Geronimo 305 Summary 306 Chapter 12: Clustering 307 WADI 308 Updating deployment descriptor and deployment plan 308 Load balancing with Apache web server 310 Installing the Apache web server 310 Web app in Geronimo served through Apache web server 310 Apache HTTP portlet 311 Accessing the sample app through Apache web server 315 Running multiple server instances from a single installation 315 Clustered Helloworld-cluster application 317 Updating workers.properties 317 Farming 320 Cluster member configuration 320 This material is copyright and is licensed for the sole use by Jillian Fraser on 20th November 2009 111 Sutter Street, Suite 1800, San Francisco, , 94104 Download at WoweBook.Com Table of Contents [ ix ] Farm deployment 321 Running a sample application with Farm deployment 322 Summary 323 Chapter 13: Logging 325 Configuring Apache Geronimo logging 326 Configuring application logging 327 Using log4j 327 Logging to the geronimo.log file and the command console 328 Logging to a separate log file 330 Logging using the ApplicationLog4jConfigurationGBean 332 Using the Java Logging API 333 Using the SLF4j logging adapter 333 Summary 334 Chapter 14: Geronimo Internals 335 Services provided by Geronimo 335 Kernel 335 ServerInfo 337 Configurations and deployment 338 ConfigurationManager 339 EditableConfigurationManager 340 LocalAttributeManager 341 ArtifactResolver 341 Developing a new GBean 342 GBean attributes 343 Magic attributes 344 GBean references 344 GBean operations 345 GBean constructor 345 GBean interface 346 GBeanLifecycle 346 Sample GBean MySampleGBean 347 Deploying the GBean 350 Testing the GBean with GBean web app sample 353 Summary 355 Appendix A: Deployment Plans 357 Environment 358 GBeans 362 Application Client 365 This material is copyright and is licensed for the sole use by Jillian Fraser on 20th November 2009 111 Sutter Street, Suite 1800, San Francisco, , 94104 Download at WoweBook.Com Table of Contents [ x ] Appendix B: Troubleshooting 367 Server startup errors 367 BindException 367 IllegalArgumentException due to a wrong instance name 368 InvalidConfigurationException 369 Deployment errors 369 MissingDependencyException 369 XmlException—Invalid deployment descriptor 370 DuplicateDeploymentException 371 Runtime errors 372 LoginException—No LoginModules configured 372 Index 373

67,512

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧