Web WEBLOGIC 6.1 Installation stateless Sessionbean development data source settings A brief introduction to the use of JMS WEBLOGIC 6.1 installation software: An installation with a compressed package and a cracked file installation process: 1. Double-click the installation file, Install WebLogic to D:\BEA when you are asked if you are a Wingdow server, select No to rest the default value 2. According to the crack instructions, readme file, remove 30 days limit 3. Edit D:\bea\wlserver6.1\config\ Set classpath= in the Set wls_pw=yourpassword56 row in the MyDomain tartweblogic.cmd69 row. \lib\weblogic_sp.jar;. \lib\weblogic.jar is the Webgloic run in the classpath where you can add the required class and path 73 line set Startmode=true Set mode true to product mode false to Development mode in this mode, you can automatically find and publish the Jar Pack 4 for EJBS in the applications directory and its subdirectories. Start the WEBLOGIC boot console in the menu (start default console) Test service stateless Sessionbean development EJB is a service provided by WebLogic, using RMI Invoke procedure: Client, find EJB server through the URL to find specific EJB send request through Jndi, get return value (remote method call protocol) The client gets a remote interface that provides services to the client through this interface WEBLOGIC the EJB's class file and EJB's description document refers to the Helloworld.jar process where hellohome creates the remote interface Hello , the client invokes the corresponding method in Hellobean through this interface, where Hellobean.class uses the Hello and hellohome only on the server side interface Both the client and the server must use the note weblogic-ejb-jar.xml <jndi-name>com.helloworld</jndi-name>com.helloworld to mark the EJB, And after adding the EJB jar package to the Jndi namespace, copy it to the applications directory and use the WebLogic console to publish it in the left tree click DoThe MAIN/DEPLOYMENTS/EJB node selects "Install a new EJB ..." on the right side. Use 1 for the JDBC buffer pool that is being prompted to operate the Weblogic6.1. Set the drive CLASS to WEBLOGIC Classpath in the WebLogic Open Console 2. In the left tree click on the Domain/servcies/jdbc/connection Pools node configuration_general page name: Myoraclepool (any Name is ok!) URL:jdbcracle:thin: @ServerIp: 1521:siddriverclassname:oracle.jdbc.driver.oracledriverproperties:user= YourUserName Password=yourpasswordthen clike The "create" Buttonthe Pool is Created.3.configuration_ Connections page: Initial Capacity: Number of initial connections after buffer pool creation. Maximum Capacity: Maximum number of connections. Capacity Increment: The number of connections that are automatically created in the buffer pool (no more than maximum Capacity) when the connection is not sufficient. Login Delay Seconds: The allowable latency time when the buffer pool creates the connection. Refresh Period: When the testing page is configured with Testtablename, if this period is non-zero, each idle connection is tested on this cycle and if the connection is incorrect, close the connection and attempt to rebuild the connection. Allow shrinking: Buffer pool Press capacity increment after creating a new connection, if there is an idle connection, whether to allow automatic deletion of idle connections (until initial capacity number) Shrink Period: Deletes the cycle of idle connections. We can set the following format: Initial capacity:5maximum capacity:10capacity increment:1login Delay seconds:0refresh period:0allow Shrin King:trueshrink period:15configuration_general page set and press rightThe Apply button on the corner saves the settings. Target page: Can be modified after binding to the server buffer pool that uses the buffer pool, and the result of the modification is valid only after restarting the WebLogic server. You can delete and copy the buffer pool by right-clicking the menu. 4. Set the data source 1, click Domain/servcies/jdbc/data Sources node in the left tree of the WebLogic console. 2, on the right select "Create a new JDBC data source ..." hyperlink, create new data sources. Just follow the prompts. Note: It is best to use TX data source---for tranaction processing. The same method. 5. Use of data source with EJB use, find URL to find Jndi get a CONNECTIONJMS profile message system The messaging system allows reliable asynchronous communication between separate, decoupled applications. Similar mail system. There are usually two types of messages. 1. The Publish/subscribe (PUBLISH/SUBSCRIBE) Publish/Subscribe message system supports an event-driven model in which both the message creator and the consumer participate in the delivery of the message. The creator publishes the event, while the consumer subscribes to events of interest and uses the event. The creator links the message to a specific topic (TOPIC), which is passed on to the user in accordance with the user's interest in registering the message. 2. Point-to-Point (Peer to Peer) in a point-to-point messaging system, the message is distributed to a single user. It maintains a "enter" message queue. The messaging application sends messages to a specific queue, and the client gets the message from a queue the same as the service provided by the WebLogic, the client through the Jndi name lookup in the console first create a JMS theme, set a JNDI (reference hint to do, with the previous presentation is similar A typical JMS client is created by the following basic steps: Create a connection to the message system Provider (Connection) create a session for receiving and sending messages Create MessageProducer and Messageconsumer to create and receive messages when the above steps are completed, a message creator client creates and publishes a message to a topic, (JNDI), and the message consumer client receives a message related to a topic. 1. Create a connection A connection provides client access to the underlying messaging system. and to achieve the allocation and management of resources. Creating a Connection by using a connectionfactory is usually specified with Jdni: Connection message=new initialcontext ();Topicconnectionfactory topicconnectionfactory= (topicconnectionfactory); topic = (topic) Jndicontext.lookup ( topicname); topicconnection =topicconnectionfactory.createtopicconnection (); 2. Creating a session session is a relatively large JMS object that provides the means to produce and consume messages. Used to create a message consumer and a message creator. Topicsession = Topicconnection.createtopicsession (False,session.auto_acknowledge); Two parameters are used to control transaction and message acknowledgement. 3. Locate a topic with Jdni to locate a topic,topic used to identify the messages sent or received, in the Publish/subscribe system. Subscribers subscribe to a given topic, and the Publisher communicates the message it publishes to a topic. The following is the creation of a Topic "Weatherreport" Topic weathertopic=messaging.lookup ("Weatherreport"); 4. Start connection after the initialization step above, the message flow is prohibited and is used to prevent unpredictable behavior in the event of initialization. Once the initialization is complete, you must have connection start the message system. Topicconnection.start (); 5. Create a message creator in the Publish/subscribe, a creator publishes the message to a specified topic. The following code shows the creation of a creator and the subsequent creation and release of a simple text message. Topicpublisher Publisher=session.createpublisher (weathertopic); Texemessage Message=session.createmessage (); Message.settext ("SSSs"); Publisher.publish (message); The following is a message consumer's code topicconnection =topicconnectionfactory.createtopicconnection (); topicsession = TopicconnectiOn.createtopicsession (False, Session.auto_acknowledge); topicsubscriber = Topicsession.createsubscriber (topic); Topiclistener = new Msglistener (); Topicsubscriber.setmessagelistener (this); Topicconnection.start ();
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service