Weblogic 9.x Development
I am using weblogic 9.x. My problem is when I make any changed and compile my class i have restart the server to get the new class.
Is there any way where classes can be reloaded without restarting server?
Is there other way to register new xbean instead of put it in CrmServiceNames file ?
Refresh Classes Using Weblogic Hot Swap
During backend XBean class:
- Set a break point in your code.
- Run the application in debug mode.
- Make sure to set your server side project output directory to the WEB-INF\classes directory
- Edit your code and save your class.
The debug hot swap facility should replace the old class with your newly compiled code and set the current break point at the beginning of the edited class.
There is no need to re-start the apploication server (Weblogic).
Please try and share with us the result.
The CustomServiceNames.lst is an xml file which contains list of the Custom bean names.
Use the UifServiceNameGen tool (located at ClfyWebInf.jar) to refresh (re-generate) the list in CustomServiceNames.lst (XBean, Worker Bean or SearchFilterBaseWB).
A re-generated CustomServiceNames.lst should be located in your WEB-INF\classes directory (ClfyAgent.ear\ClfyAgent.war\WEB-INF\classes\CustomServiceNames.lst).
1. Make sure to set your server side project output directory to the WEB-INF\classes directory.
2. Make sure to have ClfyWebInf.jar in the classpath.
Once re-generated, all newly added custom classes should be visible in your Smart Client Designer.
Using Remote Java Application
In fact, I built 2 projects. First for Smart Client Form, the second for backend.
So that I don’t know how to run the application in debug mode because I always running in smart client form
Any suggestion would be appreciated
When you run front end application (Smart Client forms), it calls the your backend code (XBeans).
Using two seperate projects, one for front end (Smart Client forms) and second for
backend is correct. You simply need to create a new Debug Remote Java Application for your backend project.
1. Create a remote java application entry
In Smart Client Designer (Eclipse),
- Select ‘Debug…’
- Right click ‘Remote Java Application’
- Select ‘New’ to create a new Remote Java Application Entry.
2. In the Remote Java Application dialog, set the following:
- An entry name,
- Your backend project, host (if weblogic runs on your machine – set it to ‘localhost’)
- Your weblogic ‘debug’ port (look at setDomainEnv.cmd script for the line ‘set DEBUG_PORT=nnnn’). The default port is 8453
3. Activate (run) the remote java application.
- When run, the backend application will wait for your front end to call it.
- Now run the front-end application. Once one of your front end forms triggers a ‘Submit’ action, it invokes your backend XBean.
- A relevant break point in your invoked XBean (backend code) should now be caught (‘hooked-up’).
From that point try to change your backend code ande see what happens.