-
1. Re: Migration from eap 5.2 to eap 6.1 and backward compatibility
jaigates Apr 8, 2013 3:53 AM (in response to jaigates)Receiving below exception when i try to test for backward compatibility with eap 5.2
error due to the following reason(s): javax.management.MalformedObjectNameException: Invalid character ':' in value part of property
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1008)
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:954)
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:870)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:416)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
-
2. Re: Migration from eap 5.2 to eap 6.1 and backward compatibility
jaikiran Apr 8, 2013 10:18 AM (in response to jaigates)jaigates vg wrote:
My immidiete need is to make application compatible with eap 6.x(6.1 i am testing now) but still continue to run in 5.2.
I don't fully understand. Are you saying you want to modify your application so that it runs both on EAP5 and EAP6? Have you tried deploying it to EAP 6.1 and did you run into issues?
-
3. Re: Migration from eap 5.2 to eap 6.1 and backward compatibility
jaigates Apr 8, 2013 11:09 AM (in response to jaikiran)I don't fully understand. Are you saying you want to modify your application so that it runs both on EAP5 and EAP6?
yes, i want to make sure my code run in both eap5 and eap6.1
Have you tried deploying it to EAP 6.1 and did you run into issues?
first i tried deploying my eap 5 complaint code in eap 6.1, i understood looks of jndi work to do. Now i need to keep a unified jndi name which will work both in eap5 and eap6.1, unfortunately when i tried keeping bean name as "java:/app/EJB/SampleBean" it is not getting deployed in eap 5 because of ":" and throwing above exception. But code works fine in eap6.1.
so need expert advice on this, to choose best jndi pattern which will work in both eap6 and eap6.1
-
4. Re: Migration from eap 5.2 to eap 6.1 and backward compatibility
jaigates Apr 9, 2013 11:41 AM (in response to jaigates)I found root cause for this problem, but need expert advice on permanent fix
Below code works fine in eap5
@Resource(mappedName="queue/request_queue")
But in eap6 queue names should be like "java:/queue/request_queue"(infact many jndi names to be), so i changed the queue name and injected like
@Resource(mappedName="java:/queue/request_queue"), this worked in EAP6 but its failing in EAP5, saying jndi name not in correct format. receiveing : javax.management.MalformedObjectNameException: Invalid character ':' in value part of property
Now, i need a permanent fix to solve this. Can we generate this jndi name dynamically during deployment time and inject in @Resource like
@Resource(mappedName=<<SOMECONSTANT>>), as far as i have seen constants should be declared during compile time itself, but then how to address this problem ???
NOTE: if i fix this by doing workaround like removing @Resource and intialising object using @PostConstruct this piece works fine. BUT i am not able define it in MDB
@MessageDriven(name = "SOMEMDBNAME", activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = <<<QUEUENAME>>>),
})
here <<<QUEUENAME>>> should be given as constant during compile time, so here also i endup in editing this according to AppServer.
So is there any permanent solution which will make my code work in both EAP5 & EAP6. As the application is huge to switch between EAP5&EAP6 looks like i need to revise lot of code, which is not ideal.
-
5. Re: Migration from eap 5.2 to eap 6.1 and backward compatibility
shane_dev Apr 9, 2013 11:49 AM (in response to jaigates)Perhaps you could use Maven. For example, I use it to set the hibernate.hbm2ddl.auto property in the persistence.xml file at build time with different profiles. By default, I set it to 'validate'. However, I set it to 'create-update' for the testing profiles. You could have an EAP5 profile and an EAP6 profile.
https://github.com/shane-k-j/jboss-trading/blob/master/trading-beans/pom.xml