Help coderanch get a
new server
by contributing to the fundraiser

Aaron Mulder

+ Follow
since Feb 25, 2003
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Aaron Mulder

You're welcome, and thank you for hosting me! And to the winners, enjoy!
21 years ago
And you can do that for SSL too, by the way -- I think there's just one protocol that's not supported over network channels, and I can't remember which one off the top of my head, but it's probably COM/JCOM or whatever.
21 years ago
Yes. You can add Network Channels which define additional ports and/or protocols, and you can use them to provide different access for different users, etc. (lots of resources on port 8080 for a web app for LAN users, and fewer resources on port 80 for the same web app for internet users, or whatever). I cover this in detail in the book, but it's farily straightforward to add a basic network channel in the console if you're familiar with the protocol settings tab for the server in the console. Just check the boxes and pick ports for the various protocols, etc. Network Channels is a top-level entry in the console in WL7.
21 years ago
I'd say that's up to you. You might care if the memory usage gets high, but that's not necessarily an indication of load -- one request can churn through gobs of memory, leaving several CPUs unused, but maybe you want to know how the memory usage is doing for some reason. Active threads is certainly a good indicator, as the threads aren't active unless some sort of request processing is going on. But how many is "too many" depends on the number of CPUs, the number of execute threads/reader threads (see the other message board thread where those settings are being discussed), and so on. Waiting threads doesn't tell you much, except insofar as it's a zero sum game with the active threads. WebLogic tracks stalled or locked threads too, which is really a sign of application problems (or I/O problems or something) more than load, but may be of interest depending on what you're doing.
21 years ago
Only if you choose to configure it that way (by mapping your servlet to the URL "servlet/ProductLookupPage" instead of just "ProductLookupPage").
21 years ago
As for the console, I'm not sure where it is in 6.1 (don't have a 6.1 server running today), but in 7 you can access the reader percentage on the "Tuning" tab for the server, and you can configure (as well as add and remove) execute queues by right-clicking on the server name in the tree on the left and selecting the execute queues option. Hopefully it's in the same place.
21 years ago
Also, you need to balance the number of listen threads versus execute threads. If you have too many listen threads, the server may be actively handling 100 requests but only have enough execute threads to act on 15 of them, resulting in the other 85 sitting around waiting. If you have too many execute threads, you may have 100 outstanding requests and 100 execute threads, but only a few of those requests are being processed because you only have 15 listen threads.
The ration of listen threads to execute threads is controlled by the ThreadPoolPercentSocketReaders parameter, which defaults to 33(%).
As has been mentioned already, you'll need to experiment a little to optimize this. In general, you don't want an outrageous number of threads, because then there will be too much overhead. As well, most people have better luck running a separate WebLogic instance for every 1-2 CPUs in the system, rather than running a single instance with loads of threads on a many-CPU system.
21 years ago
My book doesn't really discuss interoperability with specific other application servers, mostly because there are too many.
But the main question is, how do you want to communicate between the two servers?
For example, you could access EJBs in WebLogic from a Java app in Cold Fusion (I'm assuming here that CF MX can run Java apps like JRun, which I guess is pretty much a leap of faith). To do that, you'd just put the weblogic.jar file and EJB client files on the CF application classpath, create a new InitialContext with the WebLogic settings, and go from there.
If that's not an option, you can create Web Services in WebLogic, and create a client for the CF application based on the WSDL or something like that. WebLogic includes tools to generate Java clients for web services from their WSDL, and other languages probably have their own tools as well.
You could also expose EJBs in WebLogic using RMI/IIOP, and create CORBA clients to run in CF.
You could expose the information through a servlet or JSP running in WebLogic, and invoke that from the CF app, perhaps to exchange XML, or perhaps just to include WebLogic content in the web pages generated by the CF app.
You could create a J2EE connector on one side or another to wrap the information exchange.
I guess the bottom line is that you have loads of options, so you'll have to pick the most appropriate based on the technologies and characteristics of the app running in CF.
21 years ago
I guess I'm not clear on what your asking. So let me post a couple thoughts, and maybe you can clear this up for me:
  • You have a servlet doing a lot of work, it takes too long.
  • You're considering moving that to a MDB so the client doesn't have to wait for the result
  • The client will poll the server to see if the work is done? Another servlet will see if the MDB posted a message indicating that it was done? Or the client just starts the work and doesn't care whether it finishes?
  • What do you mean by deploying at runtime? You mean, when the work comes in, you want to create a new queue for this specific task and deploy a new MDB to handle just that bit of work, and then have the MDB and queue go away when the work is done? Wouldn't it be easier to just have an always-on queue and MDB and post a message with some sort of task identifier?

  • 21 years ago
    I'm not sure there's a clear answer to your question. Whether the time taken to redirect to another JSP is relevant probably depends on what else is going on in the same request. My guess would be that if there are internet clients, EJB calls, and database access going on, there's probably enough overhead already that another JSP call wouldn't be a huge hit. But it depends on a number of factors, including (to name a few) the load on the server, the arrangement of app server(s) and database on the network, whether the clients are on a LAN or crossing the internet, and so on. I'd try it both ways, run a couple test, and see if you see a noticeable difference.
    21 years ago
    Okay, it sounds like you got the property issues worked out.
    On the EJBC front, my guess would be that your build script is building a new JAR every time, which has all the basic EJB classes and DDs but not the classes generated by WebLogic. So when ejbc runs, it has to rebuild all the WebLogic classes.
    I suspect that the WebLogic example doesn't rebuild the JAR, so all the WebLogic classes stay in the JAR from run to run, and ejbc sees the old ones there, sees that they still match the EJB classes, and doesn't rebuild them.
    21 years ago
    Yeah, what you have to realize is that the examples server runs a normal WebLogic server just like any other server you'd configure (so does the Pet Store). So if you have your regular server running, you can't start the examples or pet store servers, since they all use the same ports by default (7001/7002). You can change the server.xml for any of the three configurations, so you could make yours run on 7001/7002, the examples on 7003/7004, and the pet store on 7005/7006 or something like that, if you want to run them all at once. It's just like if you installed more than one server or domain on your own machine.
    21 years ago
    Give a man a fish... Oh, never mind.
    Anyway, you'll need to learn how to write these yourself, or at least get up to speed with a tool that will do so for you, and I can't really tell you the specific content without knowing more about your EJB anyway. But to get started, you can look at the CMP entity bean examples included with WebLogic (as long as you didn't deselect the examples when you installed the product). There are lots of examples, but one EJB 2.0 CMP example is under weblogic70/samples/server/src/examples/ejb20/basic/containerManaged/
    There's also a couple of tools that might be helpful. DDinit will create started DDs for you, and ejbgen lets you put extra JavaDoc tags in your bean implementation class and it will generate the proper bean interfaces and deployment descriptors for you. There's an ejbgen example at weblogic70/samples/server/src/examples/ejb20/ejbgen/bands/
    The BEA documentation has a lot of information on EJBs, including CMP and the tools I mentioned above, here. I could also recommend a good book that covers the tools as well as manual CMP configuration in detail...
    But in general, the weblogic-ejb-jar.xml has some general info on each bean such as its JNDI name and where the CMP settings are stored (namely, the file name of the weblogic-cmp-rdbms-jar.xml DD). The CMP DD has information such as the JNDI name of the data source to use for CMP, the table name and column names for each entity, CMR mappings to specific tables and columns, etc.
    [ February 28, 2003: Message edited by: Aaron Mulder ]
    21 years ago
    Well, if you're that new to this, you should probably be hanging out in some starter Java forums...
    But to answer your question, either set your CLASSPATH environment variable before you kick off the client application:
    set CLASSPATH=c:\somewhere\weblogic.jar
    export CLASSPATH=/somewhere/weblogic.jar
    Or pass in the -classpath argument when you run your client application (the following should be all on one line):
    java -classpath c:\somewhere\weblogic.jar some.package.MyApp
    21 years ago
    I'm not sure how to link directly to it, but see the 6th post in this thread ("It depends on...").
    21 years ago