Win a copy of Emmy in the Key of Code this week in the General Computing forum!

Geert Pante

Greenhorn
+ Follow
since Feb 03, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Geert Pante

Hi,

I did read the sample code in the infocenter, but indeed I missed the part about the targetMappings.
Didn't notice it in the XML either.

So it should be :


I'll try that when I have the opportunity to work with WebSphere again.

Thanks, Geert.
7 years ago

vik ar wrote:Hi. I know how to create a jms connection factory and queue in weblogic - i just plonk a xml file (with root element <weblogic-jms>) in domains/domainname/config/jms. Is there anything similar in websphere or does it have to be done via console?


You either do it via the console (Resources->JMS->...) or via a jython script in wsadmin. See the infocenter for more information.
8 years ago
Hi All,

I tried to configure session management for a Web Module as described in the InfoCenter.

Basically, all I need to do is set the cookiePath. So I do this:

This is saved correctly in ../deployment.xml:

However, after synchronizing and restarting the application server, the cookiepath is not used. If I open the sessionManagement in the web console, and save it without changes, the following gets saved:

And now the settings get applied correctly.

I saw there is a warning that you also need to set the tuningParams via wsadmin to get the sessionManagement to work, but that doesn't help:

The tuningParams got saved this time, but the cookiePath still didn't get applied :-(

Does anybody know what the required parameters are to set in wsadmin to get the sessionManagement to work?
Greets, Geert.
8 years ago

seena mathew wrote:I am a newbie to design phase and newbie to the existing working application.
Scenario:
Functionally working code in production, MVC, in house framework since last 10 years
Requirement:
Functionally:
Looks and feel of the few pages has to be changed by using new rich java script library. There is some slight functionality change here and there too but major change is about look and feel.
Design:
It should be reusable code and could be extended for next phase change-which definitely is more changes on to other pages and maybe or maybe not changes to framework (can be struts though not sure)

Question:
Ques1: Java classes: Helper, POJO, Retrieval class : Is it better to modify the existing class or have a new class extend the old class?
My pref: Better to have new class- Large methods in existing class and at some stage the methods can be rewritten ,easy to debug
Ques2: If suggested way is new classes should they reside in a different package hierarchy so as to easily differentiate if one has to move to new framework
Ques3: Are there any recommended books/articles which might help me in understanding designing when working with new and old code better



"Prefer composition over inheritance" is an old design principle, but I thing it does apply in this case as well. If you need to implement new functionalities in your objects for your javascript library, you could use the GoF Adapter pattern. In Domain Driven Design, a more elaborate approach is called the 'Anti-Corruption Layer'. See e.g. http://www.infoq.com/minibooks/domain-driven-design-quickly.
8 years ago

Carey Brown wrote:System.out is a PrintStream.



OK, I see your point. If you wrote your code to use println functions, it's easier to replace with


Mark that I can't guarantee this will be faster.
This only makes sure that the output is not flushed automatically, but only after a certain amount of bytes is written. The default size of a BufferedOutputStream is 4096, IIRC.

Greets, Geert.
8 years ago

Christopher Nortje wrote:Remember that System.out is an variable the refers to an OutputStream, so just write to the stream as soon as the "text" become available.



If you want buffering, just write to .
8 years ago
OK, so apparently you invoke some BEA ant script from eclipse and you get an OutOfMemoryError.

You should find the launch configuration of the ant build and give it some more memory (e.g. -Xmx512m).
8 years ago

Curtis Pendleton wrote:I am trying to configure the propertySet after creating the datasource with Jython script and after I save the properties will be out there twice. Once with the value that I set them to and once with the default value. I could run the code to remove all custom properties, but then I would have to go and set all 94 custom properties.

Is there a way to update the value of a custom property without putting 2 entries and removing all other custom properties?
I also have the option to copy the custom properties from another datasource that is already created, is that possible with Jython script?



Hi there,

It took me quite a while to figure this one out, too. Hope you're not still waiting for an answer, but I'll post it anyway for other searchers.

The key is to use AdminConfig.getid('/.../J2EEResourcePropertySet:/') and AdminConfig.getid('/.../J2EEResourcePropertySet:/J2EEResourceProperty:propName/') to get the existing propertySet and/or property.

8 years ago